Posted By

aflatter on 02/08/09


Tagged

common Greatest haskell divisor gcd


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

keigoi


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  

Comments

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.