Vote UpVote

Implementing custom iterators with delayed execution

Delphi sorcery – The spring4d users amongst you will be familar with methods like IEnumerable<T>.Where which just returns the elements of an enumerable (mostly a list) that match a certain condition passed as delegate.Today we will take a look how that is achieved and what requirements should be met when implementing such a method. The method itself looks like this:function Where(const predicate: TPredicate<T>): IEnumerable<T>;You can see that it just returns an enumerable so in fact you could chain multiple Where calls and get an enumerable that only contains the elements that match every ...
Favorite? Off-Topic? noreply@blogger.com @ 2013-06-23 16:57


Visits: 1073
Votes: 3
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Jeroen Pluimers
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)