Skip to content

Instantly share code, notes, and snippets.

@iain
Created July 1, 2014 21:15
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 iain/741b93d63acf0f38c8f9 to your computer and use it in GitHub Desktop.
Save iain/741b93d63acf0f38c8f9 to your computer and use it in GitHub Desktop.
From Computerphile video: http://www.youtube.com/watch?v=i7sm9dzFtEI
(defn ack [m n]
(if (= m 0)
(+ n 1)
(if (= n 0)
(ack (- m 1) 1)
(ack (- m 1) (ack m (- n 1))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment