Created
September 28, 2010 16:05
-
-
Save jclaggett/601272 to your computer and use it in GitHub Desktop.
Revisions
-
jclaggett created this gist
Sep 28, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ (defmacro topic ([t] nil) ([t form] form) ([t form & more] `(let [~t ~form] (topic ~t ~@more))) ) (def topic-ex1 (topic % 1 (+ 1 %) (/ % 2) ) ) (def topic-ex2 [ '(->> (map vector (range) coll) (filter (fn [[f & args]] (apply f args))) (map first) ) '(topic coll (map vector (range) coll) (filter (fn [[f & args]] (apply f args)) coll) (map first coll) ) ] )