Update some of the docs.

This commit is contained in:
Simon Forman
2020-05-20 19:15:47 -07:00
parent 6a6b63bf62
commit ffabda0407
60 changed files with 5182 additions and 5853 deletions
+14 -14
View File
@@ -275,7 +275,7 @@
"metadata": {},
"outputs": [],
"source": [
"define('direco == dip rest cons')"
"define('direco dip rest cons')"
]
},
{
@@ -284,7 +284,7 @@
"metadata": {},
"outputs": [],
"source": [
"define('G == [direco] cons [swap] swoncat cons')"
"define('G [direco] cons [swap] swoncat cons')"
]
},
{
@@ -293,7 +293,7 @@
"metadata": {},
"outputs": [],
"source": [
"define('make_distributor == [dup dup max [index_of] nullary distribute] G')"
"define('make_distributor [dup dup max [index_of] nullary distribute] G')"
]
},
{
@@ -320,12 +320,12 @@
"### A function to drive a generator and count how many states before a repeat.\n",
"First draft:\n",
"\n",
" [] [GEN] x [pop index_of 0 >=] [pop size --] [[swons] dip x] primrec\n",
" [] [GEN] x [pop index_of 0 >=] [pop size --] [[swons] dip x] tailrec\n",
"\n",
"(?)\n",
"\n",
" [] [GEN] x [pop index_of 0 >=] [pop size --] [[swons] dip x] primrec\n",
" [] [...] [GEN] [pop index_of 0 >=] [pop size --] [[swons] dip x] primrec\n",
" [] [GEN] x [pop index_of 0 >=] [pop size --] [[swons] dip x] tailrec\n",
" [] [...] [GEN] [pop index_of 0 >=] [pop size --] [[swons] dip x] tailrec\n",
" [] [...] [GEN] pop index_of 0 >=\n",
" [] [...] index_of 0 >=\n",
" -1 0 >=\n",
@@ -333,7 +333,7 @@
"\n",
"Base case\n",
"\n",
" [] [...] [GEN] [pop index_of 0 >=] [pop size --] [[swons] dip x] primrec\n",
" [] [...] [GEN] [pop index_of 0 >=] [pop size --] [[swons] dip x] tailrec\n",
" [] [...] [GEN] pop size --\n",
" [] [...] size --\n",
" [] [...] size --\n",
@@ -346,7 +346,7 @@
"\n",
"Recursive case\n",
"\n",
" [] [...] [GEN] [pop index_of 0 >=] [popop size] [[swons] dip x] primrec\n",
" [] [...] [GEN] [pop index_of 0 >=] [popop size] [[swons] dip x] tailrec\n",
" [] [...] [GEN] [swons] dip x F\n",
" [] [...] swons [GEN] x F\n",
" [[...]] [GEN] x F\n",
@@ -356,7 +356,7 @@
"\n",
"What have we learned?\n",
"\n",
" F == [pop index_of 0 >=] [popop size] [[swons] dip x] primrec"
" F == [pop index_of 0 >=] [popop size] [[swons] dip x] tailrec"
]
},
{
@@ -365,7 +365,7 @@
"metadata": {},
"outputs": [],
"source": [
"define('count_states == [] swap x [pop index_of 0 >=] [popop size] [[swons] dip x] primrec')"
"define('count_states [] swap x [pop index_of 0 >=] [popop size] [[swons] dip x] tailrec')"
]
},
{
@@ -374,7 +374,7 @@
"metadata": {},
"outputs": [],
"source": [
"define('AoC2017.6 == make_distributor count_states')"
"define('AoC2017.6 make_distributor count_states')"
]
},
{
@@ -442,14 +442,14 @@
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.13"
"pygments_lexer": "ipython3",
"version": "3.8.3"
}
},
"nbformat": 4,