* | (* x y ...) | Multiplication |
+ | (+ x y ...) | Addition |
- | (- x y ...) | Subtraction |
/ | (/ x y) | Division (always returns float) |
< | (< x y) | Less than |
<= | (<= x y) | Less or equal |
= | (= x y) | Equality |
> | (> x y) | Greater than |
>= | (>= x y) | Greater or equal |
NaN? | (NaN? ...) | |
apply | (apply f coll) | Applies function f to the argument sequence coll |
assoc | (assoc m key val) | Add/update key |
assoc-in | (assoc-in m path val) | Add/update nested |
associative? | (associative? ...) | |
avg * | (avg coll) | Average of numbers |
avg-by * | (avg-by key coll) | Average field values |
boolean | (boolean ...) | |
boolean? | (boolean? ...) | |
butlast | (butlast coll) | All but last (empty list if none) |
char? | (char? ...) | |
coll? | (coll? ...) | |
combinations * | (combinations coll n) | Generate all n-combinations |
comp | (comp f1 f2 ...) | Returns a function composing fns right-to-left; (comp) returns identity |
compare | (compare x y) | Numeric comparison: -1 if x < y, 0 if x == y, 1 if x > y. Only supports numbers in PTC-Lisp. |
complement | (complement f) | Returns a function with the opposite truth value (always boolean) |
concat | (concat coll1 coll2 ...) | Join collections |
conj | (conj coll x ...) | Add elements to collection |
cons | (cons x seq) | Prepend item to sequence |
constantly | (constantly x) | Returns a function that always returns x, ignoring its arguments |
count | (count coll) | Number of items |
counted? | (counted? ...) | |
dec | (dec x) | Subtract 1 |
decimal? | (decimal? ...) | |
dedupe | (dedupe coll) | Remove consecutive duplicates |
dissoc | (dissoc m key) | Remove key |
distinct | (distinct coll) | Remove duplicates |
distinct-by * | (distinct-by key coll) | Items with unique field values |
distinct? | (distinct? x y ...) | True if all arguments are distinct |
double? | (double? ...) | |
drop | (drop n coll) | Skip first n items |
drop-last | (drop-last coll), (drop-last n coll) | |
drop-while | (drop-while pred coll) | Drop while pred is true |
empty | (empty coll) | Return empty collection of same type |
empty? | (empty? coll) | True if empty or nil |
entries | (entries m) | Get all [key value] pairs as a list |
even? | (even? ...) | |
every-pred | (every-pred p1 p2 ...) | Returns a predicate true when all preds are satisfied (always boolean) |
every? | (every? :key coll) | True if all have truthy :key |
false? | (false? ...) | |
ffirst | (ffirst coll) | First of first |
filter | (filter pred coll) | Keep items where pred is truthy |
filterv | (filterv pred coll) | Same as filter (vectors are the default) |
find | (find pred coll) | First item where pred is truthy, or nil |
first | (first coll) | First item or nil |
flatten | (flatten coll) | Flatten nested collections |
float? | (float? ...) | |
fn? | (fn? ...) | |
fnext | (fnext coll) | First of next |
fnil | (fnil ...) | |
frequencies | (frequencies coll) | Count occurrences of each item |
get | (get m key), (get m key default) | Get with default |
get-in | (get-in m path), (get-in m path default) | Get nested with default |
group-by | (group-by keyfn coll) | Group items by key |
hash-map | (hash-map & kvs) | Create map from alternating key-value pairs |
identity | (identity x) | Returns argument unchanged |
ifn? | (ifn? ...) | |
inc | (inc x) | Add 1 |
indexed? | (indexed? ...) | |
infinite? | (infinite? ...) | |
int? | (int? ...) | |
integer? | (integer? ...) | |
interleave | (interleave c1 c2) | Interleave collections |
interpose | (interpose sep coll) | Insert separator between elements |
into | (into to from) | Pour from into to |
keep | (keep f coll) | Non-nil results of (f item). false is kept. |
keep-indexed | (keep-indexed f coll) | Non-nil results of (f index item). false is kept. |
key | (key ...) | |
keys | (keys m) | Get all keys |
keyword | (keyword x) | Type coercion (string to keyword) |
keyword? | (keyword? ...) | |
last | (last coll) | Last item or nil |
map | (map f coll), (map f c1 c2), (map f c1 c2 c3) | Apply f to triples |
map-entry? | (map-entry? ...) | |
map-indexed | (map-indexed f coll) | Apply f to index and item |
map? | (map? ...) | |
mapcat | (mapcat f coll) | Apply f to each item, concatenate results |
mapv | (mapv f coll), (mapv f c1 c2), (mapv f c1 c2 c3) | Like map with three collections |
max-by * | (max-by f x), (max-by f x y & more) | Item with maximum field |
max-key | (max-key f x), (max-key f x y & more) | Return x for which (f x) is greatest |
merge | (merge m1 m2 ...) | Merge maps (later wins) |
merge-with | (merge-with f m1 m2 ...) | Merge maps with combining function for duplicates |
min-by * | (min-by f x), (min-by f x y & more) | Item with minimum field |
min-key | (min-key f x), (min-key f x y & more) | Return x for which (f x) is least |
mod | (mod x y) | Modulo (floored division, result sign matches divisor) |
nat-int? | (nat-int? ...) | |
neg-int? | (neg-int? ...) | |
neg? | (neg? ...) | |
next | (next coll) | All but first (nil if none) |
nfirst | (nfirst coll) | Next of first |
nil? | (nil? ...) | |
nnext | (nnext coll) | Next of next |
not | (not x) | Logical NOT |
not-any? | (not-any? :key coll) | True if none have truthy :key |
not-empty | (not-empty coll) | coll if not empty, else nil |
not-every? | (not-every? :key coll) | True if not all have truthy :key |
not= | (not= x y) | Inequality |
nth | (nth coll idx) | Item at index or nil |
number? | (number? ...) | |
odd? | (odd? ...) | |
partial | (partial f arg1 ...) | Returns a function with some arguments pre-filled |
partition | (partition n coll), (partition n step coll), (partition n step pad coll) | Sliding window with pad collection for incomplete groups |
partition-all | (partition-all n coll), (partition-all n step coll) | Sliding window chunks (incomplete included) |
partition-by | (partition-by f coll) | Partition when f's return value changes |
peek | (peek coll) | Return last element without removing |
pluck * | (pluck key coll) | Extract single field from each item |
pop | (pop coll) | Return collection without last element |
pos-int? | (pos-int? ...) | |
pos? | (pos? ...) | |
postwalk * | (postwalk f form) | Transform tree bottom-up (post-order traversal) |
prewalk * | (prewalk f form) | Transform tree top-down (pre-order traversal) |
println | (println ...) | Prints arguments to the execution trace, separated by spaces. Returns nil. |
range | (range end), (range start end), (range start end step) | Returns sequence with specific step |
ratio? | (ratio? ...) | |
rational? | (rational? ...) | |
reduce | (reduce f coll), (reduce f init coll) | Fold collection |
reduce-kv | (reduce-kv f init m) | Reduce map with f receiving (acc, key, val) |
rem | (rem x y) | Remainder (truncated division, result sign matches dividend) |
remove | (remove pred coll) | Remove items where pred is truthy |
rest | (rest coll) | All but first (empty list if none) |
reverse | (reverse coll) | Reverse order |
reversible? | (reversible? ...) | |
second | (second coll) | Second item or nil |
select-keys | (select-keys m keys) | Pick specific keys |
seq | (seq coll) | Convert to sequence (nil if empty) |
seq? | (seq? ...) | |
seqable? | (seqable? ...) | |
sequential? | (sequential? ...) | |
some | (some :key coll) | First truthy :key value, or nil |
some-fn | (some-fn f1 f2 ...) | Returns a function that returns the first truthy result from any fn |
some? | (some? ...) | |
sort | (sort coll), (sort comparator coll) | Sort by natural order |
sort-by | (sort-by keyfn coll), (sort-by keyfn comparator coll) | Sort with comparator |
sorted? | (sorted? ...) | |
split-at | (split-at n coll) | Split into [(take n coll) (drop n coll)] |
split-with | (split-with pred coll) | Split into [(take-while pred coll) (drop-while pred coll)] |
string? | (string? ...) | |
subvec | (subvec v start), (subvec v start end) | |
sum * | (sum coll) | Sum of numbers |
sum-by * | (sum-by key coll) | Sum field values |
symbol? | (symbol? ...) | |
take | (take n coll) | First n items |
take-last | (take-last n coll) | Last n items |
take-while | (take-while pred coll) | Take while pred is true |
tree-seq | (tree-seq branch? children root) | Flatten tree to depth-first sequence |
true? | (true? ...) | |
type | (type ...) | |
update | (update m key f & args) | Update with extra args passed to f |
update-in | (update-in m path f & args) | Update nested with extra args |
update-keys | (update-keys m f) | Apply f to each key (collision: retained value unspecified) |
update-vals | (update-vals m f) | Apply f to each value (matches Clojure 1.11) |
val | (val ...) | |
vals | (vals m) | Get all values |
vector? | (vector? ...) | |
walk * | (walk inner outer form) | Generic tree walker - applies inner to children, outer to result |
zero? | (zero? ...) | |
zip * | (zip c1 c2) | Combine into pairs |
zipmap | (zipmap keys vals) | Create map from keys and values seqs |