This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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)))) |
NewerOlder