Just a quick sense checking question, since I can't find much
info/examples about this:

Is this use of `eduction` the most efficient and/or idiomatic way to
create a 1:N mapping? I.e. in the example below for each value in
`cells` N transformed values are created...

Could this be also achieved via comp'ing the transducers? (I can't see
how at the moment...) But if so, are there any penalties w/ using
`eduction`?

;; cells = vec of ints (vector indices)
;; kernel = vec of ints (index offsets applied to each cell index)

(into #{} (mapcat (fn [i] (eduction (map #(+ i %)) kernel))) cells))

Thanks, K.

-- 
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.

Reply via email to