Meikel Brandmeyer napisaĆ(a):
> Hi,
>
> Am 06.06.2009 um 21:40 schrieb Rob Wolfe:
>
> > I'm trying to understand why this program throws an exception:
>
> It doesn't work because
>
> > (-> (new StringReader "abc")
> > (new clojure.lang.LineNumberingPushbackReader))
>
> expands to
>
> (new (new StringReader "abc") LineNumberingPushbackReader)
>
> while
>
> (-> (StringReader. "abc")
> (LineNumberingPushbackReader.))
>
> expands to
>
> (LineNumberingPushbackReader. (StringReader. "abc"))
>
> which is equivalent to
>
> (new LineNumberingPushbackReader (new StringReader "abc")).
>
> Note the difference.
Oh yes, of course, now I can see it.
I will be careful with "->" macro next time. ;)
Thanks for help.
Br,
Rob
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---