Nerd Sniped

This commit is contained in:
sforman
2023-10-09 11:44:13 -07:00
parent 04d3e96a99
commit 787dc6a7b3
8 changed files with 456 additions and 394 deletions
+5 -1
View File
@@ -149,8 +149,12 @@ Let's reformat:
Let's golf it a little. There is a version of `range` that generates its result list in reverse order, which would allow us to get rid of that `reverse` in the expression, and I bet we could modify that to generate them already incremented too. Let's assume we've done that already and call it `reverse-range-++`, why not?
[reverse-range-++ range [++] map reverse] inscribe
reverse-range-++ == range [++] map reverse
See: [`range` with `H4` in the Recursion Combinators notebook](https://joypy.osdn.io/notebooks/Recursion_Combinators.html#range-with-h4).
[reverse-range-++ [] swap [1 <=] [pop] [[swons] dupdip --] tailrec] inscribe
Then:
dup size