Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* src/main/clojure/clojure/core/match.clj: MATCH-38: interpose1 no lo…
…nger needed
  • Loading branch information
swannodette committed Oct 29, 2011
1 parent fb0e4fd commit 314c665
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/main/clojure/clojure/core/match.clj
Expand Up @@ -1413,15 +1413,6 @@
(defn- pattern-keyword? [kw]
(#{:when :as} kw))

(defn- interpose1
"Like regular interpose, but guarantees that at least one interposing
sep is used. For example, (interpose1 'x '(1)) => (1 x)"
[sep coll]
(let [result (interpose sep coll)]
(cond (seq (rest result)) result
(not (seq result)) (list sep)
:else (list (first result) sep))))

(let [void (gensym)]
;; void is a unique placeholder for nothing -- we can't use nil
;; because that's a legal symbol in a pattern row
Expand Down

0 comments on commit 314c665

Please sign in to comment.