Skip to content

Instantly share code, notes, and snippets.

@siddhartha-gadgil
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save siddhartha-gadgil/9619047 to your computer and use it in GitHub Desktop.

Select an option

Save siddhartha-gadgil/9619047 to your computer and use it in GitHub Desktop.
_*_ : ℕ → ℕ → ℕ
zero * n = zero
(succ m) * n = n + (m * n)
factorial : ℕ → ℕ
factorial zero = succ zero
factorial (succ n) = (succ n) * (factorial n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment