Last active
November 13, 2022 18:22
-
-
Save nmorse/fa25692e47e2f6857651efcf4723c7d9 to your computer and use it in GitHub Desktop.
This file contains 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
[6 3 8 4 5 7 2 9 1] | |
[1 0] # accumulator is a pair [acc index] the index is used to either multiply or add | |
[swap uncons uncons drop [acc i] [acc [i 2 % 0 ==] [*] [+] ifte 1 i +] pounce [] cons cons] | |
reduce |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment