Skip to content

Instantly share code, notes, and snippets.

@clojj
Created Oct 12, 2018
Embed
What would you like to do?
InsistentLazyRedundantcode created by anonymous - https://repl.it/repls/InsistentLazyRedundantcode
gcdHaskell :: Int -> Int -> Int
gcdHaskell x y | x > y = gcdHaskell (x - y) y
| x < y = gcdHaskell x (y - x)
| otherwise = x
main = print $ gcdHaskell 4 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment