Last active
August 29, 2015 14:00
-
-
Save janherich/11006018 to your computer and use it in GitHub Desktop.
Demystifying Clojure
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
;; common points of confusion for people new to Clojure | |
;; why core functions apparently change the type of given collection ? | |
(map inc [1 2 3 4]) ;; when evaluated, prints (2 3 4 5), not [2 3 4 5] | |
(take 2 {:a 1 :b 2 :c 3}) ;; when evaluated, prints ([:a 1] [:b 2]), not {:a 1 :b 2} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment