From 0df83bbddbe8aa8b7ba20f7a6b84de11bc2d422a Mon Sep 17 00:00:00 2001 From: a Date: Sat, 26 Mar 2022 20:19:04 -0500 Subject: [PATCH] fix mapv --- parallel/map.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parallel/map.go b/parallel/map.go index 33e5509..1d8cbaa 100644 --- a/parallel/map.go +++ b/parallel/map.go @@ -27,7 +27,7 @@ func MapV[T, V any](xs []T, fx func(T) V) []V { tmp := make([][]V, len(spl)) for i, v := range spl { go func(ix int, vx []T) { - spl[ix] = lambda.MapV(vx, fx) + tmp[ix] = lambda.MapV(vx, fx) wg.Done() }(i, v) }