Greatest common divisor: Difference between revisions
Content deleted Content added
→{{header|Nial}}: It is a shame to use variables in such a beautiful language. |
|||
Line 298:
=2
defining it
# red is the reduction operator for a sorted list
# one is termination condition
|gcd 6 4▼
red is cull filter (0 unequal) link [mod [rest, first] , first]
=2▼
one is or [= [1 first, tally], > [2 first, first]]
gcd is fork [one, first, gcd red] sort <=
Using it
=={{header|OCaml}}==
|