Fermium-co/LINQ4ES2015

Re-using an enumerable

Opened this issue · 1 comments

E.g

var filters = this.enabledFilters.asEnumerable();
ar.where(x => filters.any(f => f.filter(x)));

This won't work because the filters enumerable will be in the 'done' state after the first .any() iteration.

I wasn't expecting this behavior, but knowing it now makes me able to workaround it ;-)

Thank you.
Perhaps we can start with a spec which fails.