"loop is exactly like let, except that it establishes a recursion point
at the top of the loop, with arity equal to the number of bindings. See
recur."
(let [[a b] [1 2]]
[a b])
=> [1 2]
(as expected)
However:
(loop [[a b] [1 2]]
(if (= a 2)
true
(recur [(+ a 1) (+ b 1)])))
java.lang.NoClassDefFoundError: clojure/core$loop__4287$fn__4289
(NO_SOURCE_FILE:1)
[Thrown class clojure.lang.Compiler$CompilerException]
I expected to get "true". Is that a bug, or am I missing something?
--J.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---