(defn sprintf [& args] (with-out-str (apply printf args) *out*))
(Chrome) Uncaught TypeError: Cannot read property 'cljs$lang$maxFixedArity' of undefined
What am I doing wrong?
(def sprintf format) looks lighter.
(def sprintf format)
Error:
Uncaught TypeError: Cannot read property 'cljs$lang$maxFixedArity' of undefined
... perhaps the story with the most obscure error message actually means:
You call applyfor a function that does not exist (or was not required).
apply
Rock, future googlers!
, , "No * print-fn * fn ".
https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs, * print-fn *:
" . , * print-fn * , , .
So, I suggest you play with * print-fn * - or, as @amalloy suggested, just use the "format" directly.
(By the way, if you look at https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure , that means "* out * is not currently implemented".)