-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
Description
Hi, I have some problem using filter, rest and map in chain. After filter and rest applied map still can iterate over elements of the array even though there are no elements already.
Here is minimal case in interactive mode:
> require('lodash')([1]).rest().map(function(v) { console.log(v); }).value();
[] # OK
> require('lodash')([1]).filter(function(v) { return v; }).rest().map(function(v) { console.log(v); }).value();
1 # WTF?!
[]
> I think the problem is in the lazy evaluation.