Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (fn [some-seq]
- (let [removed (reduce
- (fn [new-seq item]
- (if (= item (first (take-last 1 new-seq)))
- new-seq
- (conj new-seq item)))
- []
- some-seq)]
- (if (= java.lang.String (type some-seq))
- (apply str removed)
- removed)))
- (fn rm-dp [some-seq]
- (let
- [removed
- (reduce
- (fn [new-seq item]
- (if (= item (first (take-last 1 new-seq)) )
- new-seq
- (conj new-seq item )))
- []
- some-seq)]
- (if (= java.lang.String (type some-seq))
- (apply str removed)
- removed)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement