Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
GDC in Haskell
gdc :: Int -> Int -> Int
gdc x y | x == y = x
| x > y = gdc (x - y) y
| x < y = gdc x (y - x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment