Skip to content

Instantly share code, notes, and snippets.

@ksexton
Created July 11, 2014 15:45
Show Gist options
  • Save ksexton/48415163006efa68a106 to your computer and use it in GitHub Desktop.
Save ksexton/48415163006efa68a106 to your computer and use it in GitHub Desktop.
user> (pprint (map collatz (range 1 11)))
((1)
(2 1)
(3 10 5 16 8 4 2 1)
(4 2 1)
(5 16 8 4 2 1)
(6 3 10 5 16 8 4 2 1)
(7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1)
(8 4 2 1)
(9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1)
(10 5 16 8 4 2 1))
nil
user>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment