Created
January 1, 2017 10:15
-
-
Save wontheone1/d5fe299f379c8912cd3a0496e9444d06 to your computer and use it in GitHub Desktop.
This file contains 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)))) | |
(into []))) |
Author
wontheone1
commented
Jan 1, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment