Primality by Wilson's theorem: Difference between revisions
m
→{{header|Factor}}: use math.factorials
m (→{{header|F_Sharp|F#}}: add </lang> tag to separate F# and Factor entries again) |
m (→{{header|Factor}}: use math.factorials) |
||
Line 116:
=={{header|Factor}}==
{{works with|Factor|0.99
<lang factor>USING: formatting grouping io kernel lists lists.lazy math
math.factorials math.functions memoize prettyprint sequences ;
: wilson ( n -- ? ) [ 1 - factorial 1 + ] [ divisor? ] bi ;
|