dtao / lazy.js

Like Underscore, but lazier

Home Page:http://danieltao.com/lazy.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zip not commutative if argument sizes do not match

excessivelyrigorous opened this issue · comments

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.

Gotcha. I'll knock this out after lunch.