Skip to content

Instantly share code, notes, and snippets.

@bleroy
Created February 16, 2020 23:31
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 bleroy/c49022353e2017007c1fd8927445d8cd to your computer and use it in GitHub Desktop.
Save bleroy/c49022353e2017007c1fd8927445d8cd to your computer and use it in GitHub Desktop.
IEnumerable<T> Weave<T>(IEnumerable<T> first, IEnumerable<T> second)
=> first
.Zip(second, (a, b) => (a, b))
.SelectMany(pair => new[] { pair.a, pair.b });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment