Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
destructure expands to keyword-lookup when a key is a keyword
  • Loading branch information
cgrand committed May 8, 2010
1 parent 6506709 commit fa13014
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/clj/clojure/core.clj
Expand Up @@ -3340,10 +3340,11 @@
(if (seq bes)
(let [bb (key (first bes))
bk (val (first bes))
has-default (contains? defaults bb)]
(recur (pb ret bb (if has-default
(list `get gmap bk (defaults bb))
(list `get gmap bk)))
args (when (contains? defaults bb)
(list (defaults bb))) ]
(recur (pb ret bb (if (keyword? bk)
(list* bk gmap args)
(list `get gmap args)))
(next bes)))
ret))))]
(cond
Expand Down

0 comments on commit fa13014

Please sign in to comment.