Re: Why does "clojure.core/run!" end in an exclamation mark?

2017-01-06 Thread Francis Avila
doseq is a macro that accepts comprehension clauses like "for", so doseq is a straight translation of for that is eager (but still uses seqs internally) and swallows its body's results. run! is like more like (doall (map f xs)), except it swallows results and uses "reduce" for speed and

Re: Why does "clojure.core/run!" end in an exclamation mark?

2016-12-25 Thread James Reeves
On 25 December 2016 at 10:30, Paulus Esterhazy wrote: > The following fn names in clojure.core contain an exclamation mark: > > "vswap!" "vreset!" "set-error-mode!" "set-agent-send-executor!" > "disj!" "conj!" "pop!" "compare-and-set!" "reset-meta!" > "set-error-handler!"

Re: Why does "clojure.core/run!" end in an exclamation mark?

2016-12-24 Thread Shantanu Kumar
I'm curious about `clojure.core/run!` too, but my question is whether it is meant to be a `reduce` variant of `clojure.core/doseq` or it has some other purpose. Shantanu On Saturday, 24 December 2016 21:37:11 UTC+5:30, James Reeves wrote: > > My understanding is that the convention used in

Why does "clojure.core/run!" end in an exclamation mark?

2016-12-24 Thread James Reeves
My understanding is that the convention used in clojure.core is to put an exclamation mark onto the end of any function unsafe to run in a transaction. Does the reasoning differ for "run!" or is it assumed that the function passed to "run!" will not usually be idempotent? - James -- You