Skip to content

Instantly share code, notes, and snippets.

@t-ob
Created May 18, 2012 15:47
Show Gist options
  • Save t-ob/2725959 to your computer and use it in GitHub Desktop.
Save t-ob/2725959 to your computer and use it in GitHub Desktop.
Recursively compute the gcd of two numbers
(fn gcd [a b]
(if (zero? b)
a
(recur b (rem a b))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment