Last active
June 24, 2023 07:57
-
-
Save mtzaldo/956d9870edbf3f7de92d6c844a616cfd to your computer and use it in GitHub Desktop.
C# map / reduce / filter
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
Map = Select | Enumerable.Range(1, 10).Select(x => x + 2); | |
Reduce = Aggregate | Enumerable.Range(1, 10).Aggregate(0, (acc, x) => acc + x); | |
Filter = Where | Enumerable.Range(1, 10).Where(x => x % 2 == 0); | |
source: http://stackoverflow.com/a/13895253 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://stackoverflow.com/a/13895253