With src/foo/core.cljs
:
(ns foo.core)
(defn calculate []
(let [xform (comp (map inc) (filter odd?) (take 123))]
(transduce xform + (iterate inc 0))))
(js/print (calculate))
Then
clj -m cljs.main -O advanced -c foo.core
Then with espruino
interpreter on your path:
$ espruino out/main.js
____ _
| __|___ ___ ___ _ _|_|___ ___
| __|_ -| . | _| | | | | . |
|____|___| _|_| |___|_|_|_|___|
|_| espruino.com
1v99.3983 (c) 2018 G.Williams
Espruino is Open Source. Our work is supported
only by sales of official boards and donations:
http://espruino.com/Donate
15129