IIndexed is the protocol that maps to nth.
Well, IIndexed is the protocol behind -nth, and some dispatching also happens in nth itself. So there is two levels of dispatch: in the nth function (closed) and in the IIndexed protocol (open). See the Michał Marczyk's comment about IIndexable and IRandomAccess. > Extending default to IIndexed leads to horrible things like > the following: > > (indexed? 1) ; => true > Yes, not "default", but rather ISeq\ISeqable.* *It's default in the sense that nth falls back to the default implementation (linear-traversal-nth) in this case. -- 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