Created
January 25, 2015 15:02
-
-
Save MikeMKH/4455d98b8f7937ebacbf to your computer and use it in GitHub Desktop.
A very simple example of Map using an increment 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
| (map inc [1 2 3 4]) | |
| ;; [2 3 4 5] |
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[] {1, 2, 3, 4} | |
| .Select(x => x+1); | |
| // { 2, 3, 4, 5 } |
Author
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/reducing-map-to-reduce-or-all-you-need.html