Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)
Paste
Pasted as Lisp by 123 ( 15 years ago )
(defprotocol AProtocol
(foo [this]))
(extend-protocol AProtocol
Object
(foo [x] (println "object") x)
MyEntity
(foo [x] (println "entity") x))
(foo (MyEntity. 1 2 3)) => entity
(foo (first (ds/query MyEntity))) => object
(class (first (ds/query MyEntity))) => my.ns.MyEntity
Revise this Paste