Posted By

aflatter on 02/08/09


common Greatest haskell divisor gcd

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Greatest common divisor (GCD) in Haskell

 / Published in: Other

  1. gcd a 0 = a
  2. gcd a b = gcd b y
  3. where y = mod a b

Report this snippet  


RSS Icon Subscribe to comments
Posted By: aflatter on February 8, 2009

(Note that this function is already defined in Prelude)

You need to login to post a comment.