Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* src/clj/cljs/core.clj: switch to mapcat

  • Loading branch information...
commit f02478a00050f38db222f85153ed191ea9a5e1d5 1 parent 3173f1a
David Nolen authored
Showing with 16 additions and 16 deletions.
  1. +16 −16 src/clj/cljs/core.clj
View
32 src/clj/cljs/core.clj
@@ -241,22 +241,22 @@
`(set! ~(symbol (str prototype-prefix f)) (fn ~@(map adapt-params meths))))
sigs))
(cons `(set! ~(symbol (str prototype-prefix pprefix)) true)
- (map (fn [[f & meths]]
- (let [ifn? (= psym 'cljs.core.IFn)
- pf (if ifn?
- (str prototype-prefix 'call)
- (str prototype-prefix pprefix f))
- adapt-params (fn [[[targ & args :as sig] & body]]
- (let [tsym (gensym "tsym")]
- `(~(with-meta (vec (cons tsym args)) (meta sig))
- (this-as ~tsym
- (let [~targ ~tsym]
- ~@body)))))
- meths (if ifn?
- (map adapt-params meths)
- meths)]
- `(set! ~(symbol pf) (fn ~@meths))))
- sigs)))))]
+ (mapcat (fn [[f & meths]]
+ (let [ifn? (= psym 'cljs.core.IFn)
+ pf (if ifn?
+ (str prototype-prefix 'call)
+ (str prototype-prefix pprefix f))
+ adapt-params (fn [[[targ & args :as sig] & body]]
+ (let [tsym (gensym "tsym")]
+ `(~(with-meta (vec (cons tsym args)) (meta sig))
+ (this-as ~tsym
+ (let [~targ ~tsym]
+ ~@body)))))
+ meths (if ifn?
+ (map adapt-params meths)
+ meths)]
+ [`(set! ~(symbol pf) (fn ~@meths))]))
+ sigs)))))]
`(do ~@(mapcat assign-impls impl-map))))))
(defmacro deftype [t fields & impls]
Please sign in to comment.
Something went wrong with that request. Please try again.