You're right, that does explain it. I assumed that variadic arguments were supported, but maybe I was wrong. Can anyone confirm whether or not this was ever intended to work?
On Apr 6, 2:32 am, Jarkko Oranen <chous...@gmail.com> wrote: > On Apr 6, 8:16 am, Zach Tellman <ztell...@gmail.com> wrote: > > > Possibly this fall out from the latest commit requiring an explicit > > 'this' reference (ba6cc3b), I haven't checked any versions but the > > most recent. > > > user> (defprotocol Protocol (f [a b & c])) > > Protocol > > user> (def p (reify Protocol (f [a b & c] [a b c]))) > > #'user/p > > user> (f p :a :b :c) > > [#<user$reify__1503 user$reify__1...@31e2ad> :a :c] > > Did protocols ever support variadic arguments? It seems to me that in > this case & gets treated as a regular symbol and a gets bound to the > object itself, b to :a, & to :b and c to :c, which would explain the > weird output. -- 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 To unsubscribe, reply using "remove me" as the subject.