doto
is part of Clojure Java interoperability features. It is designed to make it possible to write java with soooo darn many parens. So
Foo foo = new Foo;
foo.setX().setY().makeFactory().applyPhaseOfMoon();
which has 8 guys, it becomes:
(doto foo .setY .makeFactory .applyPhaseOfMoon)
which has a total of two.
In this case, if we add to the expansion of your example:
user> (doto "hi" .toUpperCase)
"hi"
expands to:
user> (macroexpand-1 '(doto "hi" .toUpperCase))
(clojure.core/let [G__110453 "hi"]
(.toUpperCase G__110453)
G__110453)
where the second line does this:
user> (.toUpperCase "hi")
"HI"
. doto
, , java Clojure inorder API.