Created
November 24, 2017 16:22
-
-
Save the-frey/5e52096444973b10405f5413ba267ca5 to your computer and use it in GitHub Desktop.
Clojure map examples for an anonymous function
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 inc [1 2]) | |
;; this is equivalent to the transformations: | |
;; (inc 1) | |
;; (inc 2) | |
;=> [2 3] | |
(map #(+ 1 %) [1 2]) | |
;; this is equivalent to the transformations: | |
;; #(+ 1 1) | |
;; #(+ 1 2) | |
;=> [2 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment