63 points · by lispython · 13y ago · 8 comments
For example:
(.timer js/d3 (fn []
(-> root (.selectAll "g") (.data curClockData)
(.select "path")
(.attr "class" #(str (:key %) (:which %))))
; return false to keep running
false))))
This snippet does this twice to provide a longish function to the d3.timer call and a small inline one to attr to set a class based on the data in the selection. More context available: http://bl.ocks.org/4326896ObTopic: cljs in cljs does sound dreamy. Would this also enable <script type="text/clojurescript">?
I predict we will see an "official" CLJS-in-CLJS around the time of the next Clojure/conj ;)
here's an example: https://github.com/dustingetz/getz-bootstrap/blob/datomic/sr...