The program
Catchesdiving: loading the interpreter…
Loading the hunter…
0catches
Trawl hunts for numbers that fit a rule. Change a number, press Run, and watch.
Loading the hunter…
2 3 + . | Numbers go on a pile (the stack). Words take numbers off the top and put results back. This prints 5. Also - * / % power and = < >. |
dup drop swap over | copy, throw away, or reorder the top numbers |
: sq dup * ; | make your own word: now 12 sq gives 144 |
c if A else B then | do A when c is not 0, otherwise B |
[ A ] | loop: keep doing A while the top number is not 0 |
1234 10 digsum | the digit sum in any base (10 here) |
42 7 bury · 7 dig | the seabed: numbered memory cells, all 0 at the start |
lo hi echo | have cells lo..hi looked exactly like this before? How many echoes ago? |
1 9 wave · want | guess a number, and rewind to the next guess when it turns out wrong |
. emit ." text" | print a number, a character, some text |