Reader forms | |
Symbols | atom, foo-bar, *foo*, etc. |
Literals | 42, "foo", nil, true, false, \c, :foo |
Keywords | :foo (like symbols, prefixed with colon) |
Lists | (a b c) |
Vectors | [a b c] |
Maps (hashes) | {:a 1 :b 2} or {:a 1, :b 2} |
Sets | #{:a :b :c} |
Macro Characters | |
Quote | 'form |
Character | \a \b \c |
Comment | ; txt |
Meta | ^a ^b ^c |
Deref | @form |
Syntax-quote | ` (backtick) |
Unquote | ~ (tilde) |
Unquote-splicing | ~@ (tilde at) |
Macro Characters (Dispatch) | |
Sets | #{:a :b :c} |
Regexp | #"pattern" |
Metadata | #^{:a 1 :b 2} [1 2 3] or #^Type x |
Var-quote | #'x |
Anonymous function | #(fn [args] (...)) |
Ignore next form | #_ |
Tail error logs to slack for fun and profit
8 years ago
no operators no statements no reserved words...who said that the parentheses are ugly??
ReplyDeleteA few things:
ReplyDelete- missing namespaced keywords, e.g., ::foo
- missing the & used to indicate a vararg, e.g., [foo & more]
- using fn [args] to start an anonymous function, instead of just #(...)
- missing the anonymous variables, e.g., %1, %2, %&
->> is used for
ReplyDelete