ILoggable

A place to keep my thoughts on programming

Tag Archives: enumerable

When lazy evaluation attacks

I just had a lovely object lesson in lazy evaluation of Iterators. I wanted to have method that would return an enumerator over an encapsulated set after doing some sanity checking: public IEnumerable<Subscription> Filter(Func<Subscription, bool> filter) { if(filter == null) … Continue reading

May 17, 2011 geek , , ,