Skip to content

Commit 5ca77c1

Browse files
committed
fix(zipx): fix the max length calculation
1 parent 82f753a commit 5ca77c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tuples.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ func ZipBy6[A any, B any, C any, D any, E any, F any, Out any](a []A, b []B, c [
432432
// of the given arrays, the second of which contains the second elements of the given arrays, and so on.
433433
// When collections have different size, the Tuple attributes are filled with zero value.
434434
func ZipBy7[A any, B any, C any, D any, E any, F any, G any, Out any](a []A, b []B, c []C, d []D, e []E, f []F, g []G, iteratee func(a A, b B, c C, d D, e E, f F, g G) Out) []Out {
435-
size := Max([]int{len(a), len(b), len(c), len(d), len(e), len(f)})
435+
size := Max([]int{len(a), len(b), len(c), len(d), len(e), len(f), len(g)})
436436

437437
result := make([]Out, 0, size)
438438

@@ -455,7 +455,7 @@ func ZipBy7[A any, B any, C any, D any, E any, F any, G any, Out any](a []A, b [
455455
// of the given arrays, the second of which contains the second elements of the given arrays, and so on.
456456
// When collections have different size, the Tuple attributes are filled with zero value.
457457
func ZipBy8[A any, B any, C any, D any, E any, F any, G any, H any, Out any](a []A, b []B, c []C, d []D, e []E, f []F, g []G, h []H, iteratee func(a A, b B, c C, d D, e E, f F, g G, h H) Out) []Out {
458-
size := Max([]int{len(a), len(b), len(c), len(d), len(e), len(f), len(g)})
458+
size := Max([]int{len(a), len(b), len(c), len(d), len(e), len(f), len(g), len(h)})
459459

460460
result := make([]Out, 0, size)
461461

0 commit comments

Comments
 (0)