File tree Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Original file line number Diff line number Diff line change 44
44
(defmacro bolt [& body]
45
45
(let [[bolt-fns other-fns] (split-with #(not (symbol? %)) body)
46
46
fns (normalize-fns bolt-fns)]
47
- `(destructuring- reify IBolt
47
+ `(reify IBolt
48
48
~@fns
49
49
~@other-fns)))
50
50
55
55
(defmacro spout [& body]
56
56
(let [[spout-fns other-fns] (split-with #(not (symbol? %)) body)
57
57
fns (normalize-fns spout-fns)]
58
- `(destructuring- reify ISpout
58
+ `(reify ISpout
59
59
~@fns
60
60
~@other-fns)))
61
61
Original file line number Diff line number Diff line change 591
591
(let [entries (->> zipfile (ZipFile. ) .entries enumeration-seq (map (memfn getName)))]
592
592
(some? #(.startsWith % (str target " /" )) entries)
593
593
))
594
-
595
- (defn destructure-method [[name args & body]]
596
- (let [[newargs subs] (reduce (fn [[args submap] val]
597
- (if (symbol? val)
598
- [(conj args val) submap]
599
- (let [newsym (gensym )]
600
- [(conj args newsym) (assoc submap newsym val)]
601
- )))
602
- [[] {}]
603
- args)
604
- let-bindings (forcat [[sym val] subs] [val sym])]
605
- `(~name ~newargs (let [~@let-bindings] ~@body))
606
- ))
607
-
608
- (defmacro destructuring-reify [& args]
609
- (let [args (map #(if (list? %) (destructure-method %) %) args)]
610
- `(reify ~@args )))
You can’t perform that action at this time.
0 commit comments