summaryrefslogtreecommitdiff
path: root/src/boot.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot.clj')
-rw-r--r--src/boot.clj14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/boot.clj b/src/boot.clj
index bfa3d21f..8698b7b7 100644
--- a/src/boot.clj
+++ b/src/boot.clj
@@ -541,6 +541,16 @@
(into-array classes)
(new clojure.lang.ProxyHandler method-map))))
+(defmacro new-proxy [classes & fs]
+ `(make-proxy
+ ~(apply vector (map (appl list 'class) classes))
+ ~(loop [fmap {} fs fs]
+ (if fs
+ (recur (assoc fmap (name (ffirst fs))
+ (cons 'fn (rfirst fs)))
+ (rest fs))
+ fmap))))
+
(defn print
([x] (thisfn x *out*))
([x writer] (. clojure.lang.RT (print x writer))))
@@ -585,10 +595,12 @@
reduce reverse comp appl
every not-every any not-any
map mapcat filter take take-while drop drop-while
+ zipmap
cycle split-at split-with repeat replicate iterate
dolist
eval import unimport refer unrefer in-namespace unintern
into-array array
- make-proxy prn print newline *out* *current-namespace* .->
+ make-proxy new-proxy
+ prn print newline *out* *current-namespace* .->
))