class - Is there an easy reference for Clojure/Java classes and protocols? -
i've been experimenting lot extending clojure's protocols existing types, seems whenever have question "how extend protocol seq-able collections?" or "how extend protocol numbers (longs, ratios, integers, floats, etc.)?" have lot of googling find answers, , then, i'm not able find definitive answer.
is aware of handy reference commonly used clojure.lang.something, java.lang.somejavaclass, etc. classes , protocols? think beneficial if had resource available out clojurians myself have little no java experience.
edit: give idea of i'm looking for, in code:
(defprotocol x (do-something [this])) (extend-protocol x ?????? <-- (do-something [this] '(implementation goes here))) is there resource might have list of clojure/java classes might useful extend protocol?
no direct answer here, useful resources:
- i find stuart sierra's class diagram project hugely useful visualizing class structure of clojure , java interfaces depends on.
- chouser has older static diagrams here
- if creating custom collections via deftype, scaffolding macro can save lot of time
Comments
Post a Comment