Skip to content

Instantly share code, notes, and snippets.

@trptcolin
Created May 30, 2010 03:46
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 trptcolin/418759 to your computer and use it in GitHub Desktop.
Save trptcolin/418759 to your computer and use it in GitHub Desktop.
; Can someone explain this to me?
(use 'clojure.test)
(are [x y] (= x y)
'(4 9 16) (map (fn [x] (* x x)) '(2 3 4)))
;;; java.lang.Exception: Unsupported binding form: clojure.lang.LazySeq@7bed76a7
(macroexpand '(are [x y] (= x y)
'(4 9 16) (map (fn [x] (* x x)) '(2 3 4))))
;;; (do (clojure.test/is (= (quote (4 9 16)) (map (fn [(quote (4 9 16))] (* (quote (4 9 16)) (quote (4 9 16)))) (quote (2 3 4))))))
(are [x y] (= x y)
'(4 9 16) (map (fn [z] (* z z)) '(2 3 4)))
;;; true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment