Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make -> and ->> metadata-aware Fixes #206

Signed-off-by: Chouser <chouser@n01se.net>
  • Loading branch information...
commit 749a0ad8b66c781d8176833f0ad26cfe6b9b24e3 1 parent 4115b53
@cgrand cgrand authored Chouser committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/clj/clojure/core.clj
View
5 src/clj/clojure/core.clj
@@ -1074,8 +1074,9 @@
second item in the first form, making a list of it if it is not a
list already. If there are more forms, inserts the first form as the
second item in second form, etc."
+ ([x] x)
([x form] (if (seq? form)
- `(~(first form) ~x ~@(next form))
+ (with-meta `(~(first form) ~x ~@(next form)) (meta form))
(list form x)))
([x form & more] `(-> (-> ~x ~form) ~@more)))
@@ -1085,7 +1086,7 @@
list already. If there are more forms, inserts the first form as the
last item in second form, etc."
([x form] (if (seq? form)
- `(~(first form) ~@(next form) ~x)
+ (with-meta `(~(first form) ~@(next form) ~x) (meta form))
(list form x)))
([x form & more] `(->> (->> ~x ~form) ~@more)))
Please sign in to comment.
Something went wrong with that request. Please try again.