Learning clojure from Clojure for the Brave and True.
Chapter 1: Building, running, and the REPL
- Control flow
if,do,when,nil?,=,and,or
- Naming values with
def - Data structures
- Maps
hash-map,get,get-in
- Keywords
- Vectors
vector
- Lists
list,nth,conj
- Sets
#,hash-set,contains?
- Simplicity
- Functions
- Function calls, macro calls, and special forms
- Defining functions
defn,doc,&,:as
- [Anonymous functions](clojure-for-the-brave-and-true.md#anonymous functions)
fn,#,%,%&
- Returning functions
letlet,take,into
looploop,recur
- Regular expressions
re-find
reducereduce,map
Chapter 4: Core functions in depth
- Treating lists, vectors, sets, and maps as sequences
- Abstraction through indirection
mapreducetake,drop,take-while, anddrop-whilefilterandsomesort,sort-by, andconcat- Lazy seqs
- Infinite sequences
intoconjapplypartialcomplement
Chapter 5: Functional programming
- Pure functions: What and why
- Recursion instead of for/while
- Function composition instead of attribute mutation
compmemoize- Misc
assoc-in,get-in
Chapter 6: Organizing your project
- Your project as a library
- Storing objects with
defdef,ns-interns,ns-map,deref,#'
- Creating and switching to namespaces
create-ns,in-ns
referrefer,:only,:exclude,:rename,defn-
alias- The relationship between file paths and namespace names
ns
- Requiring and using namespaces
require,use,refer,:only,:exclude,:as,:rename
- The
nsmacro:refer-clojure,:require,:use,:import,:load,:gen-class
Chapter 7: Reading, evaluation, and macros
- An overview of Clojure's evaluation module
- Reading
- Reader macros
- Things that evaluate to themselves
- Symbols
- Lists
- Macros
defmacro,macroexpand
- Syntactic abstraction and the
->macro
- Distinguishing symbols and values
- Simple quoting
- Syntax quoting
- ```
~
- ```
- Variable capture
gensym
- Double evaluation
- Macros all the way down
Chapter 9: The Sacred Art of Concurrent and Parallel Programming
Chapter 10: Atoms, refs, and vars
- Atoms
atom,swap!,reset
- Watches
add-watch
- Validators
alter
commute- Dynamic binding
^:dynamic,binding
- Altering the var root
alter-var-root,with-redefs
- Stateless concurrency and parallelism with
pmap
Chapter 11: Concurrent processes with core.async
- Getting started with processes
chan,go,<!,>!!
- Buffering
sliding-buffer,dropping-buffer
- Blocking and parking
!!,>!,>!!,<!,<!!,>!!,<!!
threadalts!!alts!!,alts!
- Process pipelines to escape callback hell
Chapter 12: Working with the JVM
- The JVM
- Clojure App JARs
:gen-class
- Java Interop syntax
- Creating and mutating objects
new,doto
- Importing
- The
Systemclassexit,getEnv,getProperty
- Files and I/O
spit,slurp
Chapter 13: Creating and Extending Abstractions with Multimethods, Protocols, and Records
- Multimethods
defmulti,defmethod
- Protocols
defprotocol,extend-type,extend-protocol
- Records
defrecord,dissoc