Skip to content

Commit e19a815

Browse files
committed
Update chapters/arrays/zip-function.md
Using the max length of the list arguments does not match python specification of zip. I guess that's ok if we make the behavior in this boundary case clear.
1 parent 096fd52 commit e19a815

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapters/arrays/zip-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Use the following CoffeeScript code:
1515
# Usage: zip(arr1, arr2, arr3, ...)
1616
zip = () ->
1717
lengthArray = (arr.length for arr in arguments)
18-
length = Math.max(lengthArray...)
18+
length = Math.min(lengthArray...)
1919
for i in [0...length]
2020
arr[i] for arr in arguments
2121

0 commit comments

Comments
 (0)