It shouldn't be necessary to examine the source to know what's going on in a builtin, really, but I also encountered this one recently. The way the extend-protocol macro finds which entries are types and which are function definitions is by checking which are lists.
Frankly, a better macro would involve a vector, e.g. (extend-protocol FOO [(Class/forName "[D") (methods...)] [otherClass (methods...)]) On Thursday, June 13, 2013 10:16:16 AM UTC-7, Marshall Bockrath-Vandegrift wrote: > > "Jim - FooBar();" <jimpi...@gmail.com <javascript:>> writes: > > > CompilerException java.lang.UnsupportedOperationException: nth not > > supported on this type: Character, compiling:(NO_SOURCE_PATH:1:1) > > If you examine the implementation of `extend-protocol` and for how it > distinguishes between additional functions being defined for a type and > new types to which to extend the protocol, I think you’ll see what’s > going on here. > > -Marshall > > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.