Download examples/forth/sum.fs from Snapkitty/ai-free: direct link, hf CLI and curl.
- Browser
- Download file 119 Bytes
-
https://huggingface.co/Snapkitty/ai-free/resolve/main/examples/forth/sum.fs
- Command line
-
hf download hf://Snapkitty/ai-free/examples/forth/sum.fs
-
curl -L -o sum.fs https://huggingface.co/Snapkitty/ai-free/resolve/main/examples/forth/sum.fs
119 Bytes
| \ Sum 0 + 1 + ... + n, recursively. Halts with 55 on the stack. | |
| : SUM ( n -- sum ) DUP IF DUP 1 - SUM + THEN ; | |
| 10 SUM | |