Skip to content

Instantly share code, notes, and snippets.

@skatenerd
Created May 21, 2013 00:39
Show Gist options
  • Save skatenerd/5616759 to your computer and use it in GitHub Desktop.
Save skatenerd/5616759 to your computer and use it in GitHub Desktop.
I start out with the vector-version of [1 2 3 4 5]. When I call `(map identity...)`, it should theoretically return something just like what I put in, since the `identity` function just returns what you give it. However, the result of `(map identity ...)` is much different from the original [1 2 3 4 5] vector!
user=> [1 2 3 4 5]
[1 2 3 4 5]
user=> (map identity [1 2 3 4 5])
(1 2 3 4 5)
user=> (conj [1 2 3 4 5] 6)
[1 2 3 4 5 6]
user=> (conj (map identity [1 2 3 4 5]) 6)
(6 1 2 3 4 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment