Regarding names, I would not place a bang after it (!), as there is nothing in that function itself that forbids its use inside transactions. Functions which primary purpose is to produce side effects tend to begin with 'do', so my suggestion is to name it 'domap'.
I am however still not convinced of its usefulness beyond very few specific cases. If you often need to call some side-effecty function for all items in the collection, consider extending that function so it accepts a collection as an argument, or make it a variadic fn. JW On Tuesday, January 28, 2014 4:12:35 PM UTC+1, Mars0i wrote: > > On Tuesday, January 28, 2014 7:29:06 AM UTC-6, Stefan Kamphausen wrote: >> >> Does wrapping your map expression in a dorun do what you want? >> > > Yes, it does. But that's more verbose, and as Jozef Wagner notes, it > creates seqs unnecessarily. > > I like Jozef's solution. However, I think a proper definition of mapc may > have to be more complicated, in order to allow for multiple sequence > arguments after the function argument. Maybe as a macro that calls doseq > in the end. > > If nothing like this exists, I'd call it "map!", since "mapc" is just an > odd legacy name from Common Lisp. The "!" doesn't mean that map! is > guaranteed to have side-effects, but "!" doesn't usually guarantee that, > anyway. (I delight in CL's idiosyncrasies, but appreciate Clojure's more > systematic elegance.) > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.