Skip to content

Instantly share code, notes, and snippets.

View wontheone1's full-sized avatar

WON SEOB SEO wontheone1

View GitHub Profile
(def array ["az" "toto" "picaro" "zone" "kiwi"])
(def str-arr ["I" "wish" "I" "hadn't" "come"])
(concat (drop 1 (for [elmt array]
(map (partial clojure.string/join " ") (split-at (.indexOf array elmt) array)))))
(defn partlist [arr]
(->> (remove (partial some #{""})
(for [index (range (count arr))]
(map (partial clojure.string/join " ") (split-at index arr))))