Clojure Programming/Examples/API Examples/Sequence Operators

interpose

user=> (apply str (interpose "|" ["hi" "mum" "and" "dad"]))
"hi|mum|and|dad"

interleave

user=> (interleave [1 2 3] [:a :b :c])
(1 :a 2 :b 3 :c)

reverse

user=> (apply str (interpose " " (reverse (.split "I am cold" " "))))
"cold am I"

butlast

user=> (butlast "hello")
(\h \e \l \l)

replace

(apply str (replace {\l ""} "hello world"))
=> "heo word"
Category:Book:Clojure Programming#Examples/API%20Examples/Sequence%20Operators%20
Category:Book:Clojure Programming