Skip to content

Instantly share code, notes, and snippets.

@mbertheau
Last active September 24, 2015 20:02
Show Gist options
  • Save mbertheau/9089f1a5c5e1c83130d2 to your computer and use it in GitHub Desktop.
Save mbertheau/9089f1a5c5e1c83130d2 to your computer and use it in GitHub Desktop.
(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")))
@mbertheau
Copy link
Author

Yeah, I want to get a vector for hiccup out of that. Thanks for your input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment