Last active
May 13, 2020 00:40
-
-
Save nmorse/74cf3fbdbe7a81380f51302aa1cd5b57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # without linrec these are some bad factorial implimentationz | |
| # cheapo first hack | |
| [1 [dup 1 +] rolldown 1 - repeat fac-aux] [fac] def | |
| [1 swap fac1 ] [fac0] def | |
| [dup2 >= not [swap dup 1 + rolldown fac1] [drop fac-aux] ifte ] [fac1] def | |
| [[dup 1 >] dip swap [* fac-aux] [swap drop] ifte ] [fac-aux] def | |
| 6 fac0 | |
| 6 fac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment