7 ms·
Lisper screaming See Clojure macros for thread-first `->`, thread-last `->>`, thread-as `as->`, `some->`, `some->>` and `cond->`: https://clojure.org/guides/th
by pgt 3y ago
Lisper screaming
See Clojure macros for thread-first `->`, thread-last `->>`, thread-as `as->`, `some->`, `some->>` and `cond->`: https://clojure.org/guides/threading_macros https://clojure.org/guides/threading_macros
You can leave all this hurt behind you and use ClojureScript, which compiles to JavaScript.
- pgt 3y agoExample: (->> (range 10) ;; (0 1 2 3 4 5 6 7 8 9) (filter even?) ;; (0 2 4 6 8) (map inc) ;; (1 3 5 7 9) (apply +)) ;; 25 => 25 which macroexpands to: (apply + (map inc (filter even? (range 10))))