Calling a java method on a string directly works.

user=> (.toUpperCase "hello")
"HELLO"
user=> (class "hello")
#=java.lang.String

But if I do this in a doto, it doesn't seem to work but
I don't get any error message.

user=> (doto (new java.lang.String "hello") (toUpperCase))
"hello"
user=> (class (new java.lang.String))
#=java.lang.String

Shouldn't this be working? If this is (by design) because strings are
immutable (so no doto) shouldn't there be an error message?

What am I missing here.

Parth

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

Reply via email to