tolitius / mount

managing Clojure and ClojureScript app state since (reset)
Eclipse Public License 1.0
1.23k stars 89 forks source link

Don't retain heads in side-effectful iterations #17

Closed jstepien closed 8 years ago

jstepien commented 8 years ago

Replace forms iterating over collections for the purpose of side-effects with alternatives which don't retain heads of collections.

tolitius commented 8 years ago

@jstepien: great, thank you! I missed run! as one of the Clojure 1.7 additions.


one concern that I have: mount currently works with pre Clojure 1.7 projects as well, incorporating run! will mean that all those projects won't be able to use new versions of mount.

what do you think?

jstepien commented 8 years ago

Seeing 1.7.0 in project.clj I assumed that mount isn't targeting earlier versions. But in such case we can quickly replace run! with either invoking dorun on lazy seqs, or doseq. Does it sounds good?

tolitius commented 8 years ago

yep, dorun and/or doseq sound good. I like run! too, but just wanted to be mindful to people who, for whatever reason, did not update their projects to Clojure 1.7

jstepien commented 8 years ago

@tolitius Done in 3179ed2

tolitius commented 8 years ago

great, thanks!

jstepien commented 8 years ago

My pleasure!