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)
No single method: f of interface: user.Protocol found for function: f
of protocol: Protocol
user> (f p :a :b)
No single method: f of interface: user.Protocol found for function: f
of protocol: Protocol
user> (f p :a :b :c)
[#<user$reify__1503 user$reify__1503@31e2ad> :a :c]
user> (f p :a :b :c :d)
No single method: f of interface: user.Protocol found for function: f
of protocol: Protocol
Even the one signature that doesn't result in an exception doesn't
seem right.
> user> (f p :a :b :c)
> [#<user$reify__1503 user$reify__1503@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.