Guest User

Untitled

a guest
May 9th, 2013
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;; Recursive operation
  2. (defn op[x]
  3.   (pprint "op")
  4.   #(op x))
  5.  
  6. ;; Initial function
  7. (defn fun[]
  8.   (println "fun"))
  9.  
  10. ;; set X to the 5th iteration of this recursive
  11. ;; function
  12. ;; should return a pointer to a function
  13. ;; that prints op 5 times and then prints fun
  14. ;; only it doesn't :D
  15.  
  16. (let [x (nth (iterate op fun) 5)]
  17.   (x)
  18.   )
Advertisement
Add Comment
Please, Sign In to add comment