Re: Variadic run!

2016-05-29 Thread Claudius Nicolae
Yes, I go by `(dorun (map ...` currently .
I was reading [1] and got the impression that run! is to be preferred, but 
it seems it's not a full replacement.

[1] https://stuartsierra.com/2015/08/25/clojure-donts-lazy-effects

-- 
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/d/optout.


Re: Variadic run!

2016-05-29 Thread Leon Grapenthin
run is a high performance version of (dorun (map ...)), implemented via 
reduce which also doesn't support a variadic fn. Probably (dorun (map ...)) 
is what you are looking for?

On Sunday, May 29, 2016 at 10:27:54 PM UTC+2, Claudius Nicolae wrote:
>
> run! can eagerly map a function over a coll.
> I think it would be nice to support multiple collections, making it an 
> eager version of map.
>
> My particular use case is running a test over two colls.
>
> (defn check [m1 m2]
>   (is (almost= (:x m1) (:x m2)))
>   (is (= (:y m1) (:y m2
> (run check coll1 coll2)
>

-- 
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/d/optout.


Re: Variadic run!

2016-05-29 Thread Leon Grapenthin
Have you considered (concat coll1 coll2)?

On Sunday, May 29, 2016 at 10:27:54 PM UTC+2, Claudius Nicolae wrote:
>
> run! can eagerly map a function over a coll.
> I think it would be nice to support multiple collections, making it an 
> eager version of map.
>
> My particular use case is running a test over two colls.
>
> (defn check [m1 m2]
>   (is (almost= (:x m1) (:x m2)))
>   (is (= (:y m1) (:y m2
> (run check coll1 coll2)
>

-- 
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/d/optout.


Variadic run!

2016-05-29 Thread Claudius Nicolae
run! can eagerly map a function over a coll.
I think it would be nice to support multiple collections, making it an 
eager version of map.

My particular use case is running a test over two colls.

(defn check [m1 m2]
  (is (almost= (:x m1) (:x m2)))
  (is (= (:y m1) (:y m2
(run check coll1 coll2)

-- 
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/d/optout.