view src/clojureDemo/import_java_fns.clj @ 4:6533b4ef83ad

added hash-map filters :)
author Robert McIntyre <rlm@mit.edu>
date Fri, 20 Aug 2010 01:30:12 -0400
parents 6d9bdaf919f7
children
line wrap: on
line source
1 (ns clojureDemo.import-java-fns)
5 (defmacro single-arg-fn [package fun]
6 (let [name (symbol (str package "/" fun))]
7 `(defn ~fun [a#] (~name a#))))
9 (defmacro java-map [package & fns]
10 `(do ~@(map #(list 'single-arg-fn package %) fns)))