Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as Lisp by 123 ( 13 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