diff options
author | Rich Hickey <richhickey@gmail.com> | 2008-04-28 00:49:40 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2008-04-28 00:49:40 +0000 |
commit | c6f92c0dec0938fbb5df28247dd69666d4c5e287 (patch) | |
tree | b256265afc812cbf0356e922faf88e10894d6fc2 /src | |
parent | 000a3068a9e24d6f1a2464390fdecb4241133f45 (diff) |
added :keys, :syms, and :strs support to map/set destructuring, from Chouser
Diffstat (limited to 'src')
-rw-r--r-- | src/boot.clj | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/boot.clj b/src/boot.clj index 4738c9d5..66ae81e0 100644 --- a/src/boot.clj +++ b/src/boot.clj @@ -1910,12 +1910,12 @@ not-every? (comp not every?)) defaults (:or b)] (loop [ret (-> bvec (conj gmap) (conj (list `or v {}))) bes (reduce - (fn [bes entry] - (reduce #(assoc %1 %2 ((val entry) %2)) - (dissoc bes (key entry)) - ((key entry) bes))) - (dissoc b :as :or) - {:keys #(keyword (str %)), :strs str, :syms #(list `quote %)})] + (fn [bes entry] + (reduce #(assoc %1 %2 ((val entry) %2)) + (dissoc bes (key entry)) + ((key entry) bes))) + (dissoc b :as :or) + {:keys #(keyword (str %)), :strs str, :syms #(list `quote %)})] (if bes (let [bb (key (first bes)) bk (val (first bes)) |