On Wed, Feb 25, 2009 at 10:09 PM, David Nolen <[email protected]> wrote:
> This is nothing short of amazing for those who want to build ad-hoc type
> systems.
Plus custom printing.
(defmethod print-method ::Foo [o w]
(doto w
(.write "#<Foo: ")
(.write (:x o))
(.write ">")))
(defn make-foo [x]
#^{:type ::Foo} {:x x})
user=> (make-foo "whee")
#<Foo: whee>
--Chouser
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---