dtao / lazy.js

Like Underscore, but lazier
http://danieltao.com/lazy.js/
MIT License
6.01k stars 267 forks source link

zip not commutative if argument sizes do not match #197

Closed excessivelyrigorous closed 7 years ago

excessivelyrigorous commented 7 years ago

Example 1:

Lazy([0]).zip([]) == [ 0, undefined ]
Lazy([]).zip([0]) == []

Example 2:

Lazy(['a','b']).zip([0]) == [ [ 'a', 0 ], [ 'b', undefined ] ]
Lazy([0]).zip(['a','b']) == [ [ 0, 'a' ] ]

Lodash displays commutativity in these cases.

See #196 for a similar issue.

dtao commented 7 years ago

Gotcha. I'll knock this out after lunch.