loading
open in
main.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(defmacro .>
  [x & forms]
  (loop [x x, forms forms]
    (if forms
      (let [[form & other] forms
            threaded  (with-meta
                        (map (fn [f] (if (= '% f) x f)) form)
                        (meta form))]
        (recur threaded other))
      x)))

(prn (macroexpand
  '(.>  1
        (+ % 4)
        (- 6 %))))
Clojure 1.8.0 Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14