Skip to content

Instantly share code, notes, and snippets.

@ab5tract
Created November 25, 2008 23:40
Show Gist options
  • Save ab5tract/29170 to your computer and use it in GitHub Desktop.
Save ab5tract/29170 to your computer and use it in GitHub Desktop.
def gcd(i1,i2)
( i2 == 0 ? i1 : gcd(i2, i1 % i2) )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment