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
+30 -30
View File
@@ -60,7 +60,7 @@
"metadata": {},
"outputs": [],
"source": [
"define('maxmin == [max] [min] cleave')"
"define('maxmin [max] [min] cleave')"
]
},
{
@@ -97,7 +97,7 @@
"metadata": {},
"outputs": [],
"source": [
"define('AoC2017.2 == [maxmin - +] step_zero')"
"define('AoC2017.2 [maxmin - +] step_zero')"
]
},
{
@@ -197,22 +197,22 @@
"name": "stdout",
"output_type": "stream",
"text": [
" . [8 5 2] [9 divmod] [uncons swap] dip dup [i not] dip\n",
" [8 5 2] . [9 divmod] [uncons swap] dip dup [i not] dip\n",
" [8 5 2] [9 divmod] . [uncons swap] dip dup [i not] dip\n",
" [8 5 2] [9 divmod] [uncons swap] . dip dup [i not] dip\n",
" [8 5 2] . uncons swap [9 divmod] dup [i not] dip\n",
" 8 [5 2] . swap [9 divmod] dup [i not] dip\n",
" [5 2] 8 . [9 divmod] dup [i not] dip\n",
" [5 2] 8 [9 divmod] . dup [i not] dip\n",
" [5 2] 8 [9 divmod] [9 divmod] . [i not] dip\n",
"[5 2] 8 [9 divmod] [9 divmod] [i not] . dip\n",
" [5 2] 8 [9 divmod] . i not [9 divmod]\n",
" [5 2] 8 . 9 divmod not [9 divmod]\n",
" [5 2] 8 9 . divmod not [9 divmod]\n",
" [5 2] 1 1 . not [9 divmod]\n",
" [5 2] 1 False . [9 divmod]\n",
" [5 2] 1 False [9 divmod] . \n"
" [8 5 2] [9 divmod] [uncons swap] dip dup [i not] dip\n",
" [8 5 2] [9 divmod] [uncons swap] dip dup [i not] dip\n",
" [8 5 2] [9 divmod] [uncons swap] dip dup [i not] dip\n",
" [8 5 2] [9 divmod] [uncons swap] dip dup [i not] dip\n",
" [8 5 2] uncons swap [9 divmod] dup [i not] dip\n",
" 8 [5 2] swap [9 divmod] dup [i not] dip\n",
" [5 2] 8 [9 divmod] dup [i not] dip\n",
" [5 2] 8 [9 divmod] dup [i not] dip\n",
" [5 2] 8 [9 divmod] [9 divmod] [i not] dip\n",
"[5 2] 8 [9 divmod] [9 divmod] [i not] dip\n",
" [5 2] 8 [9 divmod] i not [9 divmod]\n",
" [5 2] 8 9 divmod not [9 divmod]\n",
" [5 2] 8 9 divmod not [9 divmod]\n",
" [5 2] 1 1 not [9 divmod]\n",
" [5 2] 1 False [9 divmod]\n",
" [5 2] 1 False [9 divmod] \n"
]
}
],
@@ -418,7 +418,7 @@
"metadata": {},
"outputs": [],
"source": [
"define('G == [first % not] [first /] [rest [not] [popop 0]] [ifte] genrec')"
"define('G [first % not] [first /] [rest [not] [popop 0]] [ifte] genrec')"
]
},
{
@@ -433,9 +433,9 @@
"\n",
"It applies `G` using `nullary` because if it fails with one candidate it needs the list to get the next one (the list is otherwise consumed by `G`.)\n",
"\n",
" find-result == [0 >] [roll> popop] [roll< popop uncons [G] nullary] primrec\n",
" find-result == [0 >] [roll> popop] [roll< popop uncons [G] nullary] tailrec\n",
"\n",
" n [...] p [0 >] [roll> popop] [roll< popop uncons [G] nullary] primrec\n",
" n [...] p [0 >] [roll> popop] [roll< popop uncons [G] nullary] tailrec\n",
"\n",
"The base-case is trivial, return the (non-zero) result. The recursive branch...\n",
"\n",
@@ -454,12 +454,12 @@
"metadata": {},
"outputs": [],
"source": [
"define('find-result == [0 >] [roll> popop] [roll< popop uncons [G] nullary] primrec')"
"define('find-result [0 >] [roll> popop] [roll< popop uncons [G] nullary] tailrec')"
]
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 12,
"metadata": {},
"outputs": [
{
@@ -483,11 +483,11 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"define('prep-row == sort reverse 0 tuck')"
"define('prep-row sort reverse 0 tuck')"
]
},
{
@@ -499,11 +499,11 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"define('AoC20017.2.extra == [prep-row find-result +] step_zero')"
"define('AoC20017.2.extra [prep-row find-result +] step_zero')"
]
},
{
@@ -539,14 +539,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,