Skip to content

Instantly share code, notes, and snippets.

@clojj
Created October 12, 2018 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clojj/19bed26b940579cb2e71f8308db9169a to your computer and use it in GitHub Desktop.
Save clojj/19bed26b940579cb2e71f8308db9169a to your computer and use it in GitHub Desktop.
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