Created
September 23, 2020 05:52
-
-
Save aershov24/88b02fa3d77181d9268e03fb3ddf661e to your computer and use it in GitHub Desktop.
Markdium-
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IEnumerable Where(this IEnumerable items, Predicate< T> prodicate) | |
{ | |
foreach(var item in items) | |
{ | |
if (predicate(item)) | |
{ | |
// for lazy/deffer execution plus avoid temp collection defined | |
yield return item; | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment