Re: Need help with syntax for implementing multiple arity protocol method

2010-08-04 Thread Randy Hudson
You need to name the protocol before the method implementations. That's why the "PersistentList cannot be cast to Symbol" message -- the compiler's expecting a protocol (or interface) symbol after [r]. And, as the examples on http://clojure.org/protocols show, you need to define the different arit

Need help with syntax for implementing multiple arity protocol method

2010-08-04 Thread James
I am having trouble getting syntax right when defining a protocol function/method with multiple arities. When the defrecord is evaluated I get: java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol [Thrown class java.lang.RuntimeException] I have tried