/ Published in: Other
Expand |
Embed | Plain Text
gcd a 0 = a gcd a b = gcd b y where y = mod a b
Comments
Subscribe to comments
You need to login to post a comment.
aflatter on 02/08/09
common Greatest haskell divisor gcd
1 person have marked this snippet as a favorite
gcd a 0 = a gcd a b = gcd b y where y = mod a b
Subscribe to comments
You need to login to post a comment.
(Note that this function is already defined in Prelude)