Keywords are used much as we would use a keyword in Ruby or an enum in Java, and are prepended with a colon.
Vectors give us fast positional access to their elements. They can be created by placing the elements of the vector inside of square brackets. We create a vector and name it some-keywords in the following snippet.
|||=> (def some-keywords [:foo :bar :baz])|
We can use first to get the first element of a vector.
|||=> (first some-keywords)|
In the preceding example, the actions of the reader take place behind the scenes, as part of the REPL. Let’s make things a bit more explicit by using read-string. This takes a string directly and reads it. Here, we’re using it to read ...