Factorial in Factor
Example for versions
Factor 0.94
This example uses a built-in word factorial
defined in dictionary math.combinatorics
.
USING: formatting kernel math.combinatorics sequences ;
17 iota [ dup factorial "%d! = %d\n" printf ] each
Comments
]]>blog comments powered by Disqus
]]>