Created
April 1, 2013 10:38
-
-
Save sudowork/5284224 to your computer and use it in GitHub Desktop.
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
; Creating vectors | |
user=> [:a :b :c] | |
[:a :b :c] | |
; Operating on vectors | |
user=> (first [:a :b :c]) | |
:a | |
user=> (nth [:a :b :c] 2) ; NOTE: 0-based index | |
:c | |
user=> ([:a :b :c] 2) | |
:c | |
user=> (last [:a :b :c]) | |
:c | |
; Concatenating two vectors results in a Sequence | |
user=> (concat [:a] [:b :c]) | |
(:a :b :c) ; notice this is not a vector anymore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment