Last active
September 24, 2015 20:02
-
-
Save mbertheau/9089f1a5c5e1c83130d2 to your computer and use it in GitHub Desktop.
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
(defn f [x] | |
(vec (repeat (rand-int 5) [x]))) | |
(defn g [] | |
(-> [] | |
(into ["begin"]) | |
(into (apply concat (for [i [\a \b \c]] | |
(f i)))) | |
(into ["end"]))) | |
;; a little bit better | |
(defn g2 [] | |
(-> [] | |
(conj "begin") | |
(into (reduce into (for [i [\a \b \c]] | |
(f i)))) | |
(conj "end"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, I want to get a vector for hiccup out of that. Thanks for your input!