late.zy 233 B

12345678910111213141516
  1. // scopes working
  2. (defn f [] 23)
  3. (defn g []
  4. (let [f (fn [] 11)]
  5. (assert (== (f) 11)))
  6. 45)
  7. g()
  8. // check for late binding
  9. (defn a [] (b))
  10. (defn b [] (c))
  11. (defn c [] 88)
  12. (defn c [] 33)
  13. (assert (== (a) 33))