Skip to content

Instantly share code, notes, and snippets.

@visibletrap
Created July 14, 2012 11:09
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 visibletrap/3110628 to your computer and use it in GitHub Desktop.
Save visibletrap/3110628 to your computer and use it in GitHub Desktop.
Print-Increment Function
(defn pi
([] (pi 0))
([x] (println x) #(pi (+ x 1))))
; result
=> (((((((pi)))))))
0
1
2
3
4
5
6
pi = ->x = 0 do
puts x
->{ pi[x + 1] }
end
# result
> pi[][][][][][][]
0
1
2
3
4
5
6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment