RosettaCodeData/Task/Compile-time-calculation/Oforth/compile-time-calculation-2.fth
2023-07-01 13:44:08 -04:00

4 lines
127 B
Forth

20 seq map(#[ seq reduce(#*) ]) Constant new: ALLFACTS
: fact(n) n ifZero: [ 1 ] else: [ ALLFACTS at(n) ] ;
ALLFACTS println