Skip to content

Instantly share code, notes, and snippets.

@eibrahim
Created February 2, 2016 21:18
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 eibrahim/f9796ebabc433c0bc47b to your computer and use it in GitHub Desktop.
Save eibrahim/f9796ebabc433c0bc47b to your computer and use it in GitHub Desktop.
Greatest common denominator
def gcd x,0 do x end
def gcd x,y do gcd y, rem(x,y) end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment