Thanks for the clarification.

Just to clear up any confusion, the .toString example was just the
simplest example I could think of that illustrated was I was seeing
with regards to reflection and type hints :)

On Oct 20, 4:22 am, Michael Fogus <mefo...@gmail.com> wrote:
> Another potential option is to implement a record toString method:
>
> (defrecord Rec [^Integer i]
>   Object
>   (toString [_] (str i)))
>
> (str (Rec. 42))
> ;=> "42"

-- 
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

Reply via email to