Skip to content

Instantly share code, notes, and snippets.

@janherich
Last active August 29, 2015 14:00
Show Gist options
  • Save janherich/11006018 to your computer and use it in GitHub Desktop.
Save janherich/11006018 to your computer and use it in GitHub Desktop.
Demystifying Clojure
;; 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