Skip to content

Instantly share code, notes, and snippets.

@jfbueno
Created February 6, 2019 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfbueno/1d81b4f9bcfe1d97f792a7c7073d781e to your computer and use it in GitHub Desktop.
Save jfbueno/1d81b4f9bcfe1d97f792a7c7073d781e to your computer and use it in GitHub Desktop.
meuwhere-yield.cs
public static IEnumerable<T> MeuWhere<T>(this IEnumerable<T> src, Func<T, bool> predicate)
{
foreach(var item in src)
if (predicate(item))
yield return item;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment