2 ms·
Hm. I'm looking at the implementation[1] of pmap.... I don't fully understand the implementation (can anyone point me to something that explains what rets is? G
by erikpukinskis 11y ago
Hm. I'm looking at the implementation[1] of pmap.... I don't fully understand the implementation (can anyone point me to something that explains what rets is? Googling "clojure rets" doesn't return anything useful) but it appears to just be looping through the list and parcelling work out to multiple processors. That seems like something simple enough to do in any language with threads and function references, no?
I'll dig in some more though. Thanks for the reference.
[1] https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6709 https://github.com/clojure/clojure/blob/master/src/clj/cloju...
- hellofunk 11y agoin this code, "rets" is a local variable used in that function, which is why it wouldn't show up anywhere in google. it's just a variable name.
- edgyswingset 11y agoTo me it comes down to what my intent with the code is. I could write a few simple routines in Go that certain get the job done without much code, but when I read the code I have to perform more mental translation from how the code is written to what my intent was. In contrast, pmap or other constructs such as PLINQ get the same work done with less code that expresses my intent more clearly.