Created
January 11, 2015 17:23
-
-
Save MikeMKH/aedf6682b7fd868c895a to your computer and use it in GitHub Desktop.
Mapcat with the identity function in C# and Clojure.
This file contains hidden or 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
(mapcat identity [[1 2 3 4] [20 10]]) | |
;;(1 2 3 4 20 10) |
This file contains hidden or 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
new[] { | |
new[] {1, 2, 3, 4}, | |
new[] {20, 10} | |
}.SelectMany(x => x); | |
// { 1, 2, 3, 4, 20, 10 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See my blog post which goes with this Gist: http://comp-phil.blogspot.com/2015/01/the-city-of-mapcat.html