Fix the implementation of par-map&
It was pretty wrong...
This commit is contained in:
parent
d2646e7110
commit
93c9813546
1 changed files with 5 additions and 3 deletions
|
|
@ -133,9 +133,11 @@
|
||||||
(let loop ((lists lists))
|
(let loop ((lists lists))
|
||||||
(match lists
|
(match lists
|
||||||
(((heads tails ...) ...)
|
(((heads tails ...) ...)
|
||||||
(let ((tail (defer-to-thread-pool-channel (loop tails)))
|
(let ((tail (loop tails))
|
||||||
(head (apply proc heads)))
|
(head (defer-to-thread-pool-channel
|
||||||
(cons head (fetch-result-of-defered-thunk tail))))
|
(lambda ()
|
||||||
|
(apply proc heads)))))
|
||||||
|
(cons (fetch-result-of-defered-thunk head) tail)))
|
||||||
(_
|
(_
|
||||||
'())))))
|
'())))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue