Hey guys,

if-let and when-let macros support only 2 forms in binding vector:

(if-let [x 1 y 2]
  ...)
java.lang.IllegalArgumentExcepdtion: if-let requires exactly 2 forms in 
binding vector(NO_SOURCE_FILE:1)

Why doesn't "if-let" support any even amount of binding forms as "let" does?

e.g.
(if-let [x 1 y 2 z 3]
  (+ x y z)
  0) ; => 6

(if-let [x 1 y nil z 3]
  (+ x y z)
  0) ; => 0

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to