Catalog / Clojure Cheatsheet
Clojure Cheatsheet
A concise reference for Clojure syntax, data structures, functions, and macros, designed to help you quickly recall key elements of the language.
Core Data Structures
Basic Data Types
|
Represents null or the absence of a value. |
|
|
|
Integers, floats, ratios. Example: |
|
Immutable sequence of characters. Example: |
|
Interned strings, used as keys in maps. Example: |
|
Represents variables or function names. Example: |
Collections
|
Ordered collection. Created with |
|
Indexed collection. Created with |
|
Key-value pairs. Created with |
|
Collection of unique values. Created with |
|
A sequence supporting FIFO semantics. Created with |
Atoms
Atoms provide a mutable reference to an immutable value.
|
Functions and Macros
Function Definition
Functions are defined using
|
Anonymous functions can be created with
|
Basic Functions
|
Addition |
|
Subtraction |
|
Multiplication |
|
Integer division |
|
Remainder |
|
Increment |
|
Decrement |
Macros
Macros are code transformations performed at compile time. Defined with
|
Control Flow
Conditionals
|
|
|
|
|
|
|
|
|
|
Looping and Iteration
|
|
|
|
|
|
|
|
|
|
Exception Handling
|
Sequences and Collections
Sequence Operations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Collection Specific Functions
|
|
|
|
|
|
|
|
|
|