Skip to content

Instantly share code, notes, and snippets.

@MikeMKH
Created January 11, 2015 17:23
Show Gist options
  • Save MikeMKH/aedf6682b7fd868c895a to your computer and use it in GitHub Desktop.
Save MikeMKH/aedf6682b7fd868c895a to your computer and use it in GitHub Desktop.
Mapcat with the identity function in C# and Clojure.
(mapcat identity [[1 2 3 4] [20 10]])
;;(1 2 3 4 20 10)
new[] {
new[] {1, 2, 3, 4},
new[] {20, 10}
}.SelectMany(x => x);
// { 1, 2, 3, 4, 20, 10 }
@MikeMKH
Copy link
Author

MikeMKH commented Jan 11, 2015

See my blog post which goes with this Gist: http://comp-phil.blogspot.com/2015/01/the-city-of-mapcat.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment