In clojure, the println function returns a nil:
\>(println "a"
a
nil
This makes it awkward to use print to access an intermediate value when print debugging:
Say I have:
(* (+ 5 10) (- 8 (* 0.5 6)))
I can't do:
(* (+ 5 10) (- 8 (println (* 0.5 6))))
Ideally, I'd like a reader macro, let's say #$, that I can drop in front of the item to be printed:
(* (+ 5 10) (- 8 #$(* 0.5 6)))
This saves wrapping the printable in parentheses.
If I can't do that, is there at least a standard library print function that will pass through it's input as output? It's not hard to write, but I would like something that is available everywhere.