Created
August 11, 2018 20:04
-
-
Save clarkenciel/4c630958d699987e3498065bc358d0bf to your computer and use it in GitHub Desktop.
comparing how two maps behave on a lazy sequence vs a vector in 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
clj.core> (let [s1 (->> '(1 2 3) | |
(map #(do (println (* 10 %)) %)) | |
(map #(do (println %) %))) | |
] | |
s1) | |
10 | |
1 | |
20 | |
2 | |
30 | |
3 | |
(1 2 3) | |
clj.core> (let [s1 (->> [1 2 3] | |
(map #(do (println (* 10 %)) %)) | |
(map #(do (println %) %))) | |
] | |
s1) | |
10 | |
20 | |
30 | |
1 | |
2 | |
3 | |
(1 2 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment