# The word table

From A Little Lisp for a Small World, the Plazmi Lisp book (https://plazmi.gg/book). Checked against Plazmi Lisp version 2, 12 November 2026. The whole book as one file: https://plazmi.gg/book.md

Every word of Plazmi Lisp, version 2, made from the one table the language uses to read and check a program, so it is always the language as it is. **Takes** is what a word is given, **Gives** what it answers, and **Does** whether it only reads or changes something; a word that changes something changes only your own things. **Example** links to an example in this book that uses the word and runs, or says there is none yet.

A word in the table can start a list in any plan. The home's words and `defobject`, `defdance` and `design` are steps; the toy's words work only inside a toy's verbs and hooks. The forms the reader also takes, like `when` and `->`, are on the next page.

### The home's words

| Lisp | Takes | Gives | Does | Example |
|---|---|---|---|---|
| `roof` | type, pitch, overhang, mass | the roof: its type, pitch or overhang | changes your home | [house-roof](https://plazmi.gg/book/the-house#ex-house-roof) |
| `floor` | room, material, colour | a room's floor: a material, a colour | changes your home | [house-finish](https://plazmi.gg/book/the-house#ex-house-finish) |
| `window-box` | side, colours | window boxes on one side, with flower colours | changes your home | [house-finish](https://plazmi.gg/book/the-house#ex-house-finish) |
| `room` | name, x, z, width, depth, level | wall off a room of its own on a floor above | changes your home | [house-room](https://plazmi.gg/book/the-house#ex-house-room) |
| `build-up` |  | one more storey on top (it may cost coins) | changes your home | [house-more](https://plazmi.gg/book/the-house#ex-house-more) |
| `hang-lights` |  | string lights along the front | changes your home | no example yet |
| `porch` | porch_depth | a porch along the front | changes your home | [house-more](https://plazmi.gg/book/the-house#ex-house-more) |
| `chimney` |  | a chimney through the roof | changes your home | [house-more](https://plazmi.gg/book/the-house#ex-house-more) |
| `paint` | what, shade | a part of the house, a room's walls or a thing at home, in a shade | changes your home | [house-finish](https://plazmi.gg/book/the-house#ex-house-finish) |
| `house` | name, masses, turrets, porch, chimney | the whole house from parts: masses, turrets, a porch, a chimney | changes your home | [house-shape](https://plazmi.gg/book/the-house#ex-house-shape) |
| `place` | thing, at, facing | stand one of its own toys or things at home | changes your home | [mira-kettle](https://plazmi.gg/book/living-with-others#ex-mira-kettle) |
| `move` | thing, at, facing | move one of its own toys or things at home | changes your home | [house-move](https://plazmi.gg/book/the-house#ex-house-move) |
| `defobject, place` | name, title, spot, rules | a toy of its own from rules, as make_toy takes them, stood at home | changes your home | [preface-bell](https://plazmi.gg/book/preface#ex-preface-bell) |
| `defdance` | name, moves, title | a new dance of its own from moves | changes your home | [porch-step](https://plazmi.gg/book/designs-and-dances#ex-porch-step) |
| `design` | name, palette, rows | a pixel design of its own: palette and rows | changes your home | [flag](https://plazmi.gg/book/designs-and-dances#ex-flag) |
| `weather` | nothing | the day as the garden has it: a map of sky, wind, season, hour | reads | [home-time](https://plazmi.gg/book/your-home#ex-home-time) |
| `sky` | nothing | the sky now: a map of time, moon, stars … | reads | [home-time](https://plazmi.gg/book/your-home#ex-home-time) |
| `coins` | nothing | its own coins now, a number | reads | [home-coins](https://plazmi.gg/book/your-home#ex-home-coins) |
| `house` | nothing | its own house, as data: rooms, masses, things | reads | [home-house](https://plazmi.gg/book/your-home#ex-home-house) |
| `storage` | nothing | what it has put away, as data | reads | [home-storage](https://plazmi.gg/book/your-home#ex-home-storage) |
| `materials` | nothing | what's in its pack, as data | reads | [home-storage](https://plazmi.gg/book/your-home#ex-home-storage) |
| `world-time` | nothing | the time in the world: a map of time, day, dawn, dusk | reads | [home-time](https://plazmi.gg/book/your-home#ex-home-time) |

### Names, steps and choices

| Lisp | Takes | Gives | Does | Example |
|---|---|---|---|---|
| `(let [x (atom v)] …)` | name, value | name a value for the steps after it: name, value | names or decides | [names-let](https://plazmi.gg/book/names#ex-names-let) |
| `(reset! x v)` | name, key, value | give a named value a new value, or one key of it: name, key, value | changes a name | [names-swaps](https://plazmi.gg/book/names#ex-names-swaps) |
| `(if t … …), (when t …)` | test, then, else | decide: test, then steps, and else steps | names or decides | [choices-if](https://plazmi.gg/book/choices#ex-choices-if) |
| `(dotimes [i n] …)` | times, index, body | repeat steps up to 100 times: times, index (the count from 0), body | names or decides | [names-atom](https://plazmi.gg/book/names#ex-names-atom) |
| `(swap! x + n)` | name, key, by | add to a named number, or one key of it: name, key, by (1 if left out) | changes a name | [names-atom](https://plazmi.gg/book/names#ex-names-atom) |
| `(swap! x - n)` | name, key, by | take from a named number: name, key, by (1 if left out) | changes a name | [brief-swaps](https://plazmi.gg/book/words-in-brief#ex-brief-swaps) |
| `(swap! x not)` | name, key | turn a named true or false over: name, key | changes a name | [names-swaps](https://plazmi.gg/book/names#ex-names-swaps) |
| `(swap! x conj v)` | name, value | add a value to the end of a named list: name, value | changes a name | [names-swaps](https://plazmi.gg/book/names#ex-names-swaps) |
| `(swap! x (fn …))` | name, value | take every copy of a value out of a named list: name, value | changes a name | [lists-filter](https://plazmi.gg/book/over-lists#ex-lists-filter) |
| `(reset! x (rand-nth l))` | name, from | set a name to one of a list at random: name, from | changes a name | [brief-swaps](https://plazmi.gg/book/words-in-brief#ex-brief-swaps) |
| `(+ 2 3), any form that only works something out` | value | work out a value and answer it: value | answers a value | [preface-sum](https://plazmi.gg/book/preface#ex-preface-sum) |
| `(defn f [a] …)` | name, params, body | define a function of its own: name, params, body (a value worked out from them) | names or decides | [fn-defn](https://plazmi.gg/book/functions#ex-fn-defn) |
| `and` | 1 to 64 values | true or false | reads | [choices-logic](https://plazmi.gg/book/choices#ex-choices-logic) |
| `or` | 1 to 64 values | true or false | reads | [choices-logic](https://plazmi.gg/book/choices#ex-choices-logic) |
| `not` | [x] | true or false | reads | [choices-logic](https://plazmi.gg/book/choices#ex-choices-logic) |
| `if` | 3 values | then's value when the test holds, else otherwise's | reads | [choices-if](https://plazmi.gg/book/choices#ex-choices-if) |
| `(let [x v] …)` | name, value, in | name a value inside a value: name, value, in | reads | [names-let](https://plazmi.gg/book/names#ex-names-let) |
| `do` | 0 to 64 values | each in turn, the last its value | reads | [bell-better](https://plazmi.gg/book/first-toy#ex-bell-better) |
| `cond` | 0 to 64 values | [test, value, test, value …], the first whose test holds | reads | [choices-cond](https://plazmi.gg/book/choices#ex-choices-cond) |
| `(case x 1 "a" "b")` | 1 to 64 values | [value, then a constant (or a list of them) and its value …, then the value otherwise] | reads | [choices-case](https://plazmi.gg/book/choices#ex-choices-case) |
| `(loop [i 0] …)` | params, args, body | Lisp's loop: params, args (their first values), body | reads | [fn-loop](https://plazmi.gg/book/functions#ex-fn-loop) |
| `recur` | 0 to 64 values | a loop's, or a function's, next turn | reads | [fn-loop](https://plazmi.gg/book/functions#ex-fn-loop) |

### Tests

| Lisp | Takes | Gives | Does | Example |
|---|---|---|---|---|
| `=` | [x] or [x y] or [x y & more] | true or false | reads | [choices-tests](https://plazmi.gg/book/choices#ex-choices-tests) |
| `not=` | 1 to 64 values | true or false | reads | [choices-tests](https://plazmi.gg/book/choices#ex-choices-tests) |
| `<` | [x] or [x y] or [x y & more] | true or false | reads | [choices-tests](https://plazmi.gg/book/choices#ex-choices-tests) |
| `<=` | [x] or [x y] or [x y & more] | true or false | reads | [stone-pile](https://plazmi.gg/book/a-small-game#ex-stone-pile) |
| `>` | [x] or [x y] or [x y & more] | true or false | reads | [choices-logic](https://plazmi.gg/book/choices#ex-choices-logic) |
| `>=` | [x] or [x y] or [x y & more] | true or false | reads | [choices-tests](https://plazmi.gg/book/choices#ex-choices-tests) |
| `(= :rain (:weather (sky)))` | 1 value | true or false | reads | [brief-fixed](https://plazmi.gg/book/words-in-brief#ex-brief-fixed) |
| `(= :night (:time (sky)))` | 1 value | true or false | reads | [home-greeting](https://plazmi.gg/book/your-home#ex-home-greeting) |
| `(own? :toy "name")` | 2 values | true or false | reads | [own-things](https://plazmi.gg/book/designs-and-dances#ex-own-things) |
| `empty?` | 1 value | true or false | reads | [lists-read](https://plazmi.gg/book/text-lists-maps#ex-lists-read) |
| `(contains? (set l) v)` | 2 values | true or false | reads | [brief-fixed](https://plazmi.gg/book/words-in-brief#ex-brief-fixed) |
| `pos?` | [num] | True if num is greater than zero, else false | reads | [choices-tests](https://plazmi.gg/book/choices#ex-choices-tests) |
| `neg?` | [num] | True if num is less than zero, else false | reads | [lists-ask](https://plazmi.gg/book/over-lists#ex-lists-ask) |
| `zero?` | [num] | True if num is zero, else false | reads | [choices-tests](https://plazmi.gg/book/choices#ex-choices-tests) |
| `even?` | [n] | True if n is even, throws an exception if n is not an integer | reads | [choices-tests](https://plazmi.gg/book/choices#ex-choices-tests) |
| `odd?` | [n] | True if n is odd, throws an exception if n is not an integer | reads | [lists-keep](https://plazmi.gg/book/over-lists#ex-lists-keep) |
| `number?` | [x] | True if x is a Number | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `integer?` | [n] | True if n is an integer | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `nil?` | [x] | True if x is nil, false otherwise | reads | [choices-tests](https://plazmi.gg/book/choices#ex-choices-tests) |
| `some?` | [x] | True if x is not nil, false otherwise | reads | [brief-truth](https://plazmi.gg/book/words-in-brief#ex-brief-truth) |
| `true?` | [x] | True if x is the value true, false otherwise | reads | [brief-truth](https://plazmi.gg/book/words-in-brief#ex-brief-truth) |
| `false?` | [x] | True if x is the value false, false otherwise | reads | [brief-truth](https://plazmi.gg/book/words-in-brief#ex-brief-truth) |
| `contains?` | [coll key] | True if key is present in the given collection, otherwise returns false | reads | [maps-read](https://plazmi.gg/book/text-lists-maps#ex-maps-read) |
| `map?` | [x] | True if x implements IPersistentMap | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `string?` | [x] | True if x is a String | reads | [brief-swaps](https://plazmi.gg/book/words-in-brief#ex-brief-swaps) |
| `vector?` | [x] | True if x implements IPersistentVector | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `coll?` | [x] | True if x implements IPersistentCollection | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `keyword?` | [x] | True if x is a Keyword | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `set?` | [x] | True if x implements IPersistentSet | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `sequential?` | [coll] | True if coll implements Sequential | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `fn?` | [x] | True if x implements Fn, i.e | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `every?` | [pred coll] | True if (pred x) is logical true for every x in coll, else false | reads | [lists-ask](https://plazmi.gg/book/over-lists#ex-lists-ask) |
| `not-any?` | [pred coll] | False if (pred x) is logical true for any x in coll, else true | reads | [lists-ask](https://plazmi.gg/book/over-lists#ex-lists-ask) |
| `blank?` | [s] | True for nil, "" and spaces only | reads | [text-words](https://plazmi.gg/book/text-lists-maps#ex-text-words) |
| `includes?` | [s sub] | (includes? text part) | reads | [text-words](https://plazmi.gg/book/text-lists-maps#ex-text-words) |
| `starts-with?` | [s sub] | (starts-with? text part) | reads | [text-words](https://plazmi.gg/book/text-lists-maps#ex-text-words) |
| `ends-with?` | [s sub] | (ends-with? text part) | reads | [text-words](https://plazmi.gg/book/text-lists-maps#ex-text-words) |
| `double?` | [x] | True if x is a Double | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `float?` | [n] | True if n is a floating point number | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `int?` | [x] | True if x is a fixed precision integer | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `nat-int?` | [x] | True if x is a non-negative fixed precision integer | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `neg-int?` | [x] | True if x is a negative fixed precision integer | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `pos-int?` | [x] | True if x is a positive fixed precision integer | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `decimal?` | [n] | True if n is a BigDecimal | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `ratio?` | [n] | True if n is a Ratio | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `rational?` | [n] | True if n is a rational number | reads | [brief-number-tests](https://plazmi.gg/book/words-in-brief#ex-brief-number-tests) |
| `any?` | [x] | True given any argument | reads | [brief-truth](https://plazmi.gg/book/words-in-brief#ex-brief-truth) |
| `boolean?` | [x] | True if x is a Boolean | reads | [brief-truth](https://plazmi.gg/book/words-in-brief#ex-brief-truth) |
| `identical?` | [x y] | Tests if 2 arguments are the same object | reads | [brief-truth](https://plazmi.gg/book/words-in-brief#ex-brief-truth) |
| `ifn?` | [x] | True if x implements IFn | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `associative?` | [coll] | True if coll implements Associative | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `counted?` | [coll] | True if coll implements count in constant time | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `indexed?` | [coll] | True if coll implements Indexed, indicating efficient lookup by index | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `list?` | [x] | True if x implements IPersistentList | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `map-entry?` | [x] | True if x is a map entry | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `reversible?` | [coll] | True if coll implements Reversible | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `seq?` | [x] | True if x implements ISeq | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `seqable?` | [x] | True if the seq function is supported for x | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `sorted?` | [coll] | True if coll implements Sorted | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `distinct?` | [x] or [x y] or [x y & more] | True if no two of the arguments are = | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `not-every?` | [pred coll] | False if (pred x) is logical true for every x in coll, else true | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `realized?` | [x] | True if a value has been produced for a promise, delay, future or lazy sequence | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `reduced?` | [x] | True if x is the result of a call to reduced | reads | [brief-fold](https://plazmi.gg/book/words-in-brief#ex-brief-fold) |
| `char?` | [x] | True if x is a Character | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `ident?` | [x] | True if x is a symbol or keyword | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `qualified-ident?` | [x] | True if x is a symbol or keyword with a namespace | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `qualified-keyword?` | [x] | True if x is a keyword with a namespace | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `qualified-symbol?` | [x] | True if x is a symbol with a namespace | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `simple-ident?` | [x] | True if x is a symbol or keyword without a namespace | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `simple-keyword?` | [x] | True if x is a keyword without a namespace | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `simple-symbol?` | [x] | True if x is a symbol without a namespace | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `symbol?` | [x] | True if x is a Symbol | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |

### Numbers

| Lisp | Takes | Gives | Does | Example |
|---|---|---|---|---|
| `+` | [] or [x] or [x y] | The sum of nums | reads | [preface-sum](https://plazmi.gg/book/preface#ex-preface-sum) |
| `-` | [x] or [x y] or [x y & more] | If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the resul … | reads | [forms-calls](https://plazmi.gg/book/forms#ex-forms-calls) |
| `*` | [] or [x] or [x y] | The product of nums | reads | [forms-calls](https://plazmi.gg/book/forms#ex-forms-calls) |
| `(/ (double a) b)` | 2 values | a number: the first over the second, as a decimal | reads | [brief-fixed](https://plazmi.gg/book/words-in-brief#ex-brief-fixed) |
| `mod` | [num div] | Modulus of num and div | reads | [chance-in-turn](https://plazmi.gg/book/chance#ex-chance-in-turn) |
| `quot` | [num div] | Quot[ient] of dividing numerator by denominator | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `min` | [x] or [x y] or [x y & more] | The least of the nums | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `max` | [x] or [x y] or [x y & more] | The greatest of the nums | reads | [forms-calls](https://plazmi.gg/book/forms#ex-forms-calls) |
| `abs` | [x] | (abs -3) is 3 | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `round` | [x] | (round 2.5) is 3 | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `sqrt` | [x] | (sqrt 9) is 3.0 | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `sin` | [x] | Sine, in radians | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `cos` | [x] | Cosine, in radians | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `atan2` | [y x] | (atan2 y x): the angle to a point, in radians | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `pi` | nothing | π, 3.14159… | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `(format "%.2f" (double n))` | 2 values | text: the number with that many decimals | reads | [brief-fixed](https://plazmi.gg/book/words-in-brief#ex-brief-fixed) |
| `(/ a b)` | 1 to 64 values | Lisp's /, a whole number over another a fraction | reads | [brief-fixed](https://plazmi.gg/book/words-in-brief#ex-brief-fixed) |
| `inc` | [x] | A number one greater than num | reads | [maps-make](https://plazmi.gg/book/text-lists-maps#ex-maps-make) |
| `dec` | [x] | A number one less than num | reads | [fn-recursion](https://plazmi.gg/book/functions#ex-fn-recursion) |
| `rem` | [num div] | Remainder of dividing numerator by denominator | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `int` | [x] | Coerce to int | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `long` | [x] | Coerce to long | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `double` | [x] | Coerce to double | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `compare` | [x y] | Comparator | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `rand` | [] or [n] | A random floating point number between 0 (inclusive) and n (default 1) (exclusive) | reads | [chance-words](https://plazmi.gg/book/chance#ex-chance-words) |
| `rand-int` | [n] | A random integer between 0 (inclusive) and n (exclusive) | reads | [chance-words](https://plazmi.gg/book/chance#ex-chance-words) |
| `bit-and` | [x y] or [x y & more] | Bitwise and | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `bit-or` | [x y] or [x y & more] | Bitwise or | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `bit-xor` | [x y] or [x y & more] | Bitwise exclusive or | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `pow` | [x y] | (pow 2 10) is 1024.0 | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `tan` | [x] | Tangent, in radians | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `ceil` | [x] | (ceil 2.1) is 3 | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `clamp` | [x lo hi] | (clamp x lo hi): x, kept between lo and hi | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `parse-long` | [s] | (parse-long "42") is 42; nil when it isn't a whole number | reads | [text-format](https://plazmi.gg/book/text-lists-maps#ex-text-format) |
| `parse-double` | [s] | (parse-double "2.5") is 2.5; nil when it isn't a number | reads | [text-format](https://plazmi.gg/book/text-lists-maps#ex-text-format) |
| `inc'` | [x] | A number one greater than num | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `dec'` | [x] | A number one less than num | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `+'` | [] or [x] or [x y] | The sum of nums | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `-'` | [x] or [x y] or [x y & more] | If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the resul … | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `*'` | [] or [x] or [x y] | The product of nums | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `bit-and-not` | [x y] or [x y & more] | Bitwise and with complement | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `bit-clear` | [x n] | Clear bit at index n | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `bit-flip` | [x n] | Flip bit at index n | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `bit-not` | [x] | Bitwise complement | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `bit-set` | [x n] | Set bit at index n | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `bit-shift-left` | [x n] | Bitwise shift left | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `bit-shift-right` | [x n] | Bitwise shift right | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `bit-test` | [x n] | Test bit at index n | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `unsigned-bit-shift-right` | [x n] | Bitwise shift right, without sign-extension | reads | [brief-bits](https://plazmi.gg/book/words-in-brief#ex-brief-bits) |
| `byte` | [x] | Coerce to byte | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `short` | [x] | Coerce to short | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `float` | [x] | Coerce to float | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `num` | [x] | Coerce to Number | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `denominator` | [r] | The denominator part of a Ratio | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `numerator` | [r] | The numerator part of a Ratio | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `rationalize` | [num] | Returns the rational value of num | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `bigdec` | [x] | Coerce to BigDecimal | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `bigint` | [x] | Coerce to BigInt | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |
| `biginteger` | [x] | Coerce to BigInteger | reads | [brief-number-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-number-kinds) |

### Values and text

| Lisp | Takes | Gives | Does | Example |
|---|---|---|---|---|
| `str` | 0 to 64 values | text: the values written one after another | reads | [forms-calls](https://plazmi.gg/book/forms#ex-forms-calls) |
| `(join sep l)` | 2 values | text: the list's items with the separator between | reads | [text-split](https://plazmi.gg/book/text-lists-maps#ex-text-split) |
| `:k` | [its name, like rain] | a keyword: [its name, like rain] | reads | [forms-values](https://plazmi.gg/book/forms#ex-forms-values) |
| `#"…"` | [it, as text] | a pattern for re-find and the like: [it, as text] | reads | [forms-collections](https://plazmi.gg/book/forms#ex-forms-collections) |
| `boolean` | [x] | Coerce to boolean | reads | [brief-truth](https://plazmi.gg/book/words-in-brief#ex-brief-truth) |
| `subs` | [s start] or [s start end] | The substring of s beginning at start inclusive, and ending at end (defaults to length of string), e … | reads | [text-basics](https://plazmi.gg/book/text-lists-maps#ex-text-basics) |
| `name` | [x] | The name String of a string, symbol or keyword | reads | [text-keywords](https://plazmi.gg/book/text-lists-maps#ex-text-keywords) |
| `symbol` | [name] or [ns name] | A Symbol with the given namespace and name | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `lower` | [s] | (lower "Hi") is "hi" | reads | [text-words](https://plazmi.gg/book/text-lists-maps#ex-text-words) |
| `upper` | [s] | (upper "hi") is "HI" | reads | [text-words](https://plazmi.gg/book/text-lists-maps#ex-text-words) |
| `trim` | [s] | Text without the spaces at either end | reads | [text-words](https://plazmi.gg/book/text-lists-maps#ex-text-words) |
| `split` | [s sep] | (split "a,b" ",") is ["a" "b"]; the separator is plain text | reads | [text-split](https://plazmi.gg/book/text-lists-maps#ex-text-split) |
| `replace-all` | [s a b] | (replace-all text old new), plain text, every time | reads | [text-words](https://plazmi.gg/book/text-lists-maps#ex-text-words) |
| `words` | [s] | (words "a b") is ["a" "b"] | reads | [text-split](https://plazmi.gg/book/text-lists-maps#ex-text-split) |
| `format` | [fmt & args] | Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax | reads | [text-format](https://plazmi.gg/book/text-lists-maps#ex-text-format) |
| `pr-str` | [& xs] | Pr to a string, returning it | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `re-find` | [m] or [re s] | The next regex match, if any, of string to pattern, using java.util.regex.Matcher.find() | reads | [text-patterns](https://plazmi.gg/book/text-lists-maps#ex-text-patterns) |
| `re-matches` | [re s] | The match, if any, of string to pattern, using java.util.regex.Matcher.matches() | reads | [text-patterns](https://plazmi.gg/book/text-lists-maps#ex-text-patterns) |
| `re-seq` | [re s] | A lazy sequence of successive matches of pattern in string, using java.util.regex.Matcher.find(), ea … | reads | [text-patterns](https://plazmi.gg/book/text-lists-maps#ex-text-patterns) |
| `type` | [x] | The :type metadata of x, or its Class if none | reads | [forms-type](https://plazmi.gg/book/forms#ex-forms-type) |
| `match` | [text pattern] | (match "I love your garden" "i * your *") is ["love" "garden"]: each * takes the words it stands for … | reads | [parrot-match](https://plazmi.gg/book/listening#ex-parrot-match) |
| `reflect` | [text] | (reflect "I love your garden!") is "You love my garden!": the words turned round, as ELIZA did, read … | reads | [mirror](https://plazmi.gg/book/listening#ex-mirror) |
| `char` | [x] | Coerce to char | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `char-escape-string` |  | Escape string for char or nil if none | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `char-name-string` |  | Name string for char or nil if none | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `namespace` | [x] | The namespace String of a symbol or keyword, or nil if not present | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `print-str` | [& xs] | Print to a string, returning it | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `println-str` | [& xs] | Println to a string, returning it | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `prn-str` | [& xs] | Prn to a string, returning it | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `re-groups` | [m] | The groups from the most recent match/find | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |
| `re-matcher` | [re s] | An instance of java.util.regex.Matcher, for use, e.g | reads | [brief-text](https://plazmi.gg/book/words-in-brief#ex-brief-text) |

### Lists and maps

| Lisp | Takes | Gives | Does | Example |
|---|---|---|---|---|
| `(get m :k), (:k m)` | [map, key] or [map, key, otherwise] | one key of a map: [map, key] or [map, key, otherwise] | reads | [names-apart](https://plazmi.gg/book/names#ex-names-apart) |
| `{:k v}` | entries | a map from keys to values: entries | reads | [forms-type](https://plazmi.gg/book/forms#ex-forms-type) |
| `nth` | [coll index] or [coll index not-found] | the item at that place, from 0 | reads | [names-apart](https://plazmi.gg/book/names#ex-names-apart) |
| `count` | 1 value | how many items | reads | [text-basics](https://plazmi.gg/book/text-lists-maps#ex-text-basics) |
| `(vec (range a b))` | 1 to 2 values | a list of numbers: [from, below] or [below] | reads | [lists-make](https://plazmi.gg/book/text-lists-maps#ex-lists-make) |
| `(vec (concat a b))` | 1 to 64 values | one list of the lists' items | reads | [porch-again](https://plazmi.gg/book/designs-and-dances#ex-porch-again) |
| `(vec (reverse l))` | 1 value | the list, last first | reads | [brief-fixed](https://plazmi.gg/book/words-in-brief#ex-brief-fixed) |
| `(assoc m :k v)` | [map, key, value] | a map with one key set: [map, key, value] | reads | [names-unchanged](https://plazmi.gg/book/names#ex-names-unchanged) |
| `(mapv (fn [x] …) l)` | each, in, value | a list worked out from each item of another: each, in, value | reads | [stairs](https://plazmi.gg/book/designs-and-dances#ex-stairs) |
| `{"a" 1 :b 2}` | [key, value, key, value …] | a map as Lisp writes one, keys of any kind, in order: [key, value, key, value …] | reads | [forms-collections](https://plazmi.gg/book/forms#ex-forms-collections) |
| `(get m k)` | [map, key] or [map, key, otherwise] | Lisp's get, a key of any kind: [map, key] or [map, key, otherwise] | reads | [home-storage](https://plazmi.gg/book/your-home#ex-home-storage) |
| `(map f l)` | [function, list …] | Lisp's map: [function, list …] | reads | [choices-threading](https://plazmi.gg/book/choices#ex-choices-threading) |
| `(range a b)` | 0 to 3 values | a value | reads | [lists-filter](https://plazmi.gg/book/over-lists#ex-lists-filter) |
| `(concat a b)` | 0 to 64 values | a value | reads | [lists-make](https://plazmi.gg/book/text-lists-maps#ex-lists-make) |
| `(reverse l)` | 1 value | a value | reads | [lists-make](https://plazmi.gg/book/text-lists-maps#ex-lists-make) |
| `rand-nth` | [coll] | A random element of the (sequential) collection | reads | [chance-words](https://plazmi.gg/book/chance#ex-chance-words) |
| `shuffle` | [coll] | A random permutation of coll | reads | [chance-words](https://plazmi.gg/book/chance#ex-chance-words) |
| `assoc` | [map key val] or [map key val & kvs] | Assoc[iate] | reads | [stone-pile](https://plazmi.gg/book/a-small-game#ex-stone-pile) |
| `assoc-in` | [m [k & ks] v] | Associates a value in a nested associative structure, where ks is a sequence of keys and v is the ne … | reads | [maps-make](https://plazmi.gg/book/text-lists-maps#ex-maps-make) |
| `dissoc` | [map] or [map key] or [map key & ks] | Dissoc[iate] | reads | [maps-make](https://plazmi.gg/book/text-lists-maps#ex-maps-make) |
| `update` | [m k f] or [m k f x] or [m k f x y] | 'Updates' a value in an associative structure, where k is a key and f is a function that will take t … | reads | [maps-make](https://plazmi.gg/book/text-lists-maps#ex-maps-make) |
| `update-in` | [m ks f & args] | 'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a funct … | reads | [maps-make](https://plazmi.gg/book/text-lists-maps#ex-maps-make) |
| `get-in` | [m ks] or [m ks not-found] | The value in a nested associative structure, where ks is a sequence of keys | reads | [maps-read](https://plazmi.gg/book/text-lists-maps#ex-maps-read) |
| `keys` | [map] | A sequence of the map's keys, in the same order as (seq map) | reads | [maps-read](https://plazmi.gg/book/text-lists-maps#ex-maps-read) |
| `vals` | [map] | A sequence of the map's values, in the same order as (seq map) | reads | [maps-read](https://plazmi.gg/book/text-lists-maps#ex-maps-read) |
| `key` | [e] | The key of the map entry | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `val` | [e] | The value in the map entry | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `merge` | [& maps] | A map that consists of the rest of the maps conj-ed onto the first | reads | [maps-make](https://plazmi.gg/book/text-lists-maps#ex-maps-make) |
| `conj` | [] or [coll] or [coll x] | Conj[oin] | reads | [lists-make](https://plazmi.gg/book/text-lists-maps#ex-lists-make) |
| `cons` | [x seq] | A new seq where x is the first element and seq is the rest | reads | [lists-make](https://plazmi.gg/book/text-lists-maps#ex-lists-make) |
| `into` | [] or [to] or [to from] | A new coll consisting of to with all of the items of from conjoined | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `not-empty` | [coll] | If coll is empty, returns nil, else coll | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `first` | [coll] | The first item in the collection | reads | [lists-read](https://plazmi.gg/book/text-lists-maps#ex-lists-read) |
| `second` | [x] | Same as (first (next x)) | reads | [lists-read](https://plazmi.gg/book/text-lists-maps#ex-lists-read) |
| `last` | [coll] | The last item in coll, in linear time | reads | [lists-read](https://plazmi.gg/book/text-lists-maps#ex-lists-read) |
| `rest` | [coll] | A possibly empty seq of the items after the first | reads | [lists-read](https://plazmi.gg/book/text-lists-maps#ex-lists-read) |
| `next` | [coll] | A seq of the items after the first | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `butlast` | [coll] | A seq of all but the last item in coll, in linear time | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `nthnext` | [coll n] | The nth next of coll, (seq coll) when n is 0 | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `take` | [n] or [n coll] | A lazy sequence of the first n items in coll, or all items if there are fewer than n | reads | [lists-make](https://plazmi.gg/book/text-lists-maps#ex-lists-make) |
| `drop` | [n] or [n coll] | A laziness-preserving sequence of all but the first n items in coll | reads | [lists-make](https://plazmi.gg/book/text-lists-maps#ex-lists-make) |
| `take-last` | [n coll] | A seq of the last n items in coll | reads | [lists-make](https://plazmi.gg/book/text-lists-maps#ex-lists-make) |
| `drop-last` | [coll] or [n coll] | A lazy sequence of all but the last n (default 1) items in coll | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `take-while` | [pred] or [pred coll] | A lazy sequence of successive items from coll while (pred item) returns logical true | reads | [lists-more](https://plazmi.gg/book/over-lists#ex-lists-more) |
| `drop-while` | [pred] or [pred coll] | A lazy sequence of the items in coll starting from the first item for which (pred item) returns logi … | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `vec` | [coll] | Creates a new vector containing the contents of coll | reads | [guest-log](https://plazmi.gg/book/memory#ex-guest-log) |
| `set` | [coll] | A set of the distinct elements of coll | reads | [names-swaps](https://plazmi.gg/book/names#ex-names-swaps) |
| `vector` | [] or [a] or [a b] | Creates a new vector containing the args | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `list` | [& items] | Creates a new list containing the items | reads | [forms-quote](https://plazmi.gg/book/forms#ex-forms-quote) |
| `hash-map` | [] or [& keyvals] | Keyval => key val Returns a new hash map with supplied mappings | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `array-map` | [] or [& keyvals] | Constructs an array-map | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `hash-set` | [] or [& keys] | A new hash set with supplied keys | reads | [forms-collections](https://plazmi.gg/book/forms#ex-forms-collections) |
| `sort` | [coll] or [comp coll] | A sorted sequence of the items in coll | reads | [lists-make](https://plazmi.gg/book/text-lists-maps#ex-lists-make) |
| `sort-by` | [keyfn coll] or [keyfn comp coll] | A sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item) | reads | [lists-sort](https://plazmi.gg/book/over-lists#ex-lists-sort) |
| `distinct` | [] or [coll] | A lazy sequence of the elements of coll with duplicates removed | reads | [lists-make](https://plazmi.gg/book/text-lists-maps#ex-lists-make) |
| `frequencies` | [coll] | A map from distinct items in coll to the number of times they appear | reads | [lists-sort](https://plazmi.gg/book/over-lists#ex-lists-sort) |
| `group-by` | [f coll] | A map of the elements of coll keyed by the result of f on each element | reads | [lists-sort](https://plazmi.gg/book/over-lists#ex-lists-sort) |
| `zipmap` | [keys vals] | A map with the keys mapped to the corresponding vals | reads | [maps-make](https://plazmi.gg/book/text-lists-maps#ex-maps-make) |
| `select-keys` | [map keyseq] | A map containing only those entries in map whose key is in keys | reads | [maps-make](https://plazmi.gg/book/text-lists-maps#ex-maps-make) |
| `find` | [map key] | The map entry for key, or nil if key not present | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `peek` | [coll] | For a list or queue, same as first, for a vector, same as, but much more efficient than, last | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `pop` | [coll] | For a list or queue, returns a new list/queue without the first item, for a vector, returns a new ve … | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `subvec` | [v start] or [v start end] | A persistent vector of the items in vector from start (inclusive) to end (exclusive) | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `flatten` | [x] | Takes any nested combination of sequential things (lists, vectors, etc.) and returns their contents  … | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `partition` | [n coll] or [n step coll] or [n step pad coll] | A lazy sequence of lists of n items each, at offsets step apart | reads | [lists-more](https://plazmi.gg/book/over-lists#ex-lists-more) |
| `partition-all` | [n] or [n coll] or [n step coll] | A lazy sequence of lists like partition, but may include partitions with fewer than n items at the e … | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `interleave` | [] or [c1] or [c1 c2] | A lazy seq of the first item in each coll, then the second etc | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `interpose` | [sep] or [sep coll] | A lazy seq of the elements of coll separated by sep | reads | [lists-more](https://plazmi.gg/book/over-lists#ex-lists-more) |
| `repeat` | [x] or [n x] | A lazy (infinite!, or length n if supplied) sequence of xs | reads | [names-atom](https://plazmi.gg/book/names#ex-names-atom) |
| `seq` | [coll] | A seq on the collection | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `empty` | [coll] | An empty collection of the same category as coll, or nil | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `mapv` | [f coll] or [f c1 c2] or [f c1 c2 c3] | A vector consisting of the result of applying f to the set of first items of each coll, followed by  … | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `filter` | [pred] or [pred coll] | A lazy sequence of the items in coll for which (pred item) returns logical true | reads | [lists-filter](https://plazmi.gg/book/over-lists#ex-lists-filter) |
| `filterv` | [pred coll] | A vector of the items in coll for which (pred item) returns logical true | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `remove` | [pred] or [pred coll] | A lazy sequence of the items in coll for which (pred item) returns logical false | reads | [lists-filter](https://plazmi.gg/book/over-lists#ex-lists-filter) |
| `keep` | [f] or [f coll] | A lazy sequence of the non-nil results of (f item) | reads | [lists-keep](https://plazmi.gg/book/over-lists#ex-lists-keep) |
| `map-indexed` | [f] or [f coll] | A lazy sequence consisting of the result of applying f to 0 and the first item of coll, followed by  … | reads | [lists-more](https://plazmi.gg/book/over-lists#ex-lists-more) |
| `mapcat` | [f] or [f & colls] | The result of applying concat to the result of applying map to f and colls | reads | [lists-more](https://plazmi.gg/book/over-lists#ex-lists-more) |
| `some` | [pred coll] | The first logical true value of (pred x) for any x in coll, else nil | reads | [lists-ask](https://plazmi.gg/book/over-lists#ex-lists-ask) |
| `reduce` | [f coll] or [f val coll] | F should be a function of 2 arguments | reads | [lists-reduce](https://plazmi.gg/book/over-lists#ex-lists-reduce) |
| `reduce-kv` | [f init coll] | Reduces an associative collection | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `max-key` | [k x] or [k x y] or [k x y & more] | The x for which (k x), a number, is greatest | reads | [lists-sort](https://plazmi.gg/book/over-lists#ex-lists-sort) |
| `min-key` | [k x] or [k x y] or [k x y & more] | The x for which (k x), a number, is least | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `==` | [x] or [x y] or [x y & more] | Non-nil if nums all have the equivalent value (type-independent), otherwise false | reads | [brief-numbers](https://plazmi.gg/book/words-in-brief#ex-brief-numbers) |
| `random-sample` | [prob] or [prob coll] | Items from coll with random probability of prob (0.0 - 1.0) | reads | [brief-chance](https://plazmi.gg/book/words-in-brief#ex-brief-chance) |
| `pick-one` | 0 to 64 values | a value | reads | [chance-words](https://plazmi.gg/book/chance#ex-chance-words) |
| `bounded-count` | [n coll] | If coll is counted? returns its count, else will count at most the first n elements of coll using it … | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `disj` | [set] or [set key] or [set key & ks] | Disj[oin] | reads | [sets](https://plazmi.gg/book/text-lists-maps#ex-sets) |
| `ffirst` | [x] | Same as (first (first x)) | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `fnext` | [x] | Same as (first (next x)) | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `list*` | [args] or [a args] or [a b args] | Creates a new seq containing the items prepended to the rest, the last of which will be treated as a … | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `merge-with` | [f & maps] | A map that consists of the rest of the maps conj-ed onto the first | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `nfirst` | [x] | Same as (next (first x)) | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `nnext` | [x] | Same as (next (next x)) | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `nthrest` | [coll n] | The nth rest of coll, coll when n is 0 | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `replace` | [smap] or [smap coll] | Given a map of replacement pairs and a vector/collection, returns a vector/seq with any elements = a … | reads | [brief-making](https://plazmi.gg/book/words-in-brief#ex-brief-making) |
| `rseq` | [rev] | Returns, in constant time, a seq of the items in rev (which can be a vector or sorted-map), in rever … | reads | [brief-lists](https://plazmi.gg/book/words-in-brief#ex-brief-lists) |
| `rsubseq` | [sc test key] or [sc start-test start-key end-test end-key] | Sc must be a sorted collection, test(s) one of <, <=, > or >= | reads | [brief-sorted](https://plazmi.gg/book/words-in-brief#ex-brief-sorted) |
| `sorted-map` | [& keyvals] | Keyval => key val Returns a new sorted map with supplied mappings | reads | [brief-sorted](https://plazmi.gg/book/words-in-brief#ex-brief-sorted) |
| `sorted-map-by` | [comparator & keyvals] | Keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator | reads | [brief-sorted](https://plazmi.gg/book/words-in-brief#ex-brief-sorted) |
| `sorted-set` | [& keys] | A new sorted set with supplied keys | reads | [brief-kinds](https://plazmi.gg/book/words-in-brief#ex-brief-kinds) |
| `sorted-set-by` | [comparator & keys] | A new sorted set with supplied keys, using the supplied comparator | reads | [brief-sorted](https://plazmi.gg/book/words-in-brief#ex-brief-sorted) |
| `subseq` | [sc test key] or [sc start-test start-key end-test end-key] | Sc must be a sorted collection, test(s) one of <, <=, > or >= | reads | [brief-sorted](https://plazmi.gg/book/words-in-brief#ex-brief-sorted) |
| `cat` | [rf] | A transducer which concatenates the contents of each input, which must be a collection, into the red … | reads | [brief-fold](https://plazmi.gg/book/words-in-brief#ex-brief-fold) |
| `completing` | [f] or [f cf] | Takes a reducing function f of 2 args and returns a fn suitable for transduce by adding an arity-1 s … | reads | [brief-fold](https://plazmi.gg/book/words-in-brief#ex-brief-fold) |
| `cycle` | [coll] | A lazy (infinite!) sequence of repetitions of the items in coll | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `dedupe` | [] or [coll] | A lazy sequence removing consecutive duplicates in coll | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `doall` | [coll] or [n coll] | When lazy sequences are produced via functions that have side effects, any effects other than those  … | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `dorun` | [coll] or [n coll] | When lazy sequences are produced via functions that have side effects, any effects other than those  … | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `eduction` | [xform* coll] | A reducible/iterable application of the transducers to the items in coll | reads | [brief-fold](https://plazmi.gg/book/words-in-brief#ex-brief-fold) |
| `ensure-reduced` | [x] | If x is already reduced?, returns it, else returns (reduced x) | reads | [brief-fold](https://plazmi.gg/book/words-in-brief#ex-brief-fold) |
| `halt-when` | [pred] or [pred retf] | A transducer that ends transduction when pred returns true for an input | reads | [brief-fold](https://plazmi.gg/book/words-in-brief#ex-brief-fold) |
| `iterate` | [f x] | A lazy (infinite!) sequence of x, (f x), (f (f x)) etc | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `keep-indexed` | [f] or [f coll] | A lazy sequence of the non-nil results of (f index item) | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `partition-by` | [f] or [f coll] | Applies f to each value in coll, splitting it each time f returns a new value | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `reduced` | [x] | Wraps x in a way such that a reduce will terminate with the value x | reads | [brief-fold](https://plazmi.gg/book/words-in-brief#ex-brief-fold) |
| `reductions` | [f coll] or [f init coll] | A lazy seq of the intermediate values of the reduction (as per reduce) of coll by f, starting with i … | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `repeatedly` | [f] or [n f] | Takes a function of no args, presumably with side effects, and returns an infinite (or length n if s … | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `replicate` | [n x] | DEPRECATED: Use 'repeat' instead | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `run!` | [proc coll] | Runs the supplied procedure (via reduce), for purposes of side effects, on successive items in the c … | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `sequence` | [coll] or [xform coll] or [xform coll & colls] | Coerces coll to a (possibly empty) sequence, if it is not already one | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `split-at` | [n coll] | A vector of [(take n coll) (drop n coll)] | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `split-with` | [pred coll] | A vector of [(take-while pred coll) (drop-while pred coll)] | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `take-nth` | [n] or [n coll] | A lazy seq of every nth item in coll | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `transduce` | [xform f coll] or [xform f init coll] | Reduce with a transformation of f (xf) | reads | [brief-fold](https://plazmi.gg/book/words-in-brief#ex-brief-fold) |
| `tree-seq` | [branch? children root] | A lazy sequence of the nodes in a tree, via a depth-first walk | reads | [brief-over](https://plazmi.gg/book/words-in-brief#ex-brief-over) |
| `unreduced` | [x] | If x is reduced?, returns (deref x), else returns x | reads | [brief-fold](https://plazmi.gg/book/words-in-brief#ex-brief-fold) |

### Functions

| Lisp | Takes | Gives | Does | Example |
|---|---|---|---|---|
| `(f a b)` | fn, args | call a function the plan defined, or one named: fn, args | reads | [fn-defn](https://plazmi.gg/book/functions#ex-fn-defn) |
| `(fn [a b] …)` | params, body | a function as a value: params, body | reads | [lists-map-fn](https://plazmi.gg/book/over-lists#ex-lists-map-fn) |
| `count, str …` | [length] | one of these ops as a function, by its name: [length] | reads | [maps-make](https://plazmi.gg/book/text-lists-maps#ex-maps-make) |
| `((fn …) x)` | [function, args …] | call a function worked out: [function, args …] | reads | [fn-call](https://plazmi.gg/book/functions#ex-fn-call) |
| `identity` | [x] | Its argument | reads | [brief-truth](https://plazmi.gg/book/words-in-brief#ex-brief-truth) |
| `apply` | [f args] or [f x args] or [f x y args] | Applies fn f to the argument list formed by prepending intervening arguments to args | reads | [lists-more](https://plazmi.gg/book/over-lists#ex-lists-more) |
| `partial` | [f] or [f arg1] or [f arg1 arg2] | Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable  … | reads | [fn-makers](https://plazmi.gg/book/functions#ex-fn-makers) |
| `comp` | [] or [f] or [f g] | Takes a set of functions and returns a fn that is the composition of those fns | reads | [fn-makers](https://plazmi.gg/book/functions#ex-fn-makers) |
| `complement` | [f] | Takes a fn f and returns a fn that takes the same arguments as f, has the same effects, if any, and  … | reads | [fn-makers](https://plazmi.gg/book/functions#ex-fn-makers) |
| `constantly` | [x] | A function that takes any number of arguments and returns x | reads | [fn-makers](https://plazmi.gg/book/functions#ex-fn-makers) |
| `juxt` | [f] or [f g] or [f g h] | Takes a set of functions and returns a fn that is the juxtaposition of those fns | reads | [fn-makers](https://plazmi.gg/book/functions#ex-fn-makers) |
| `fnil` | [f x] or [f x y] or [f x y z] | Takes a function f, and returns a function that calls f, replacing a nil first argument to f with th … | reads | [lists-reduce-map](https://plazmi.gg/book/over-lists#ex-lists-reduce-map) |
| `every-pred` | [p] or [p1 p2] or [p1 p2 p3] | Takes a set of predicates and returns a function f that returns true if all of its composing predica … | reads | [brief-functions](https://plazmi.gg/book/words-in-brief#ex-brief-functions) |
| `some-fn` | [p] or [p1 p2] or [p1 p2 p3] | Takes a set of predicates and returns a function f that returns the first logical true value returne … | reads | [brief-functions](https://plazmi.gg/book/words-in-brief#ex-brief-functions) |
| `memoize` | [f] | A memoized version of a referentially transparent function | reads | [brief-functions](https://plazmi.gg/book/words-in-brief#ex-brief-functions) |
| `trampoline` | [f] or [f & args] | Trampoline can be used to convert algorithms requiring mutual recursion without stack consumption | reads | [brief-functions](https://plazmi.gg/book/words-in-brief#ex-brief-functions) |

### The toy's words

| Lisp | Takes | Gives | Does | Example |
|---|---|---|---|---|
| `(defobject name {…})` | on_tick, open, name, verbs, state, title, on_hear, on_visit, spot | a toy of its own with whole bodies: name, title, state, verbs (each a hook: params, body, a list of values run in turn), on_hear, on_tick (dawn), on_visit, spot; inside, say, put! and the toy's own ops | changes your home | [chance-die](https://plazmi.gg/book/chance#ex-chance-die) |
| `say` | self, text | nothing; the toy says it (three lines a time, 280 characters a line) | changes the toy | [preface-bell](https://plazmi.gg/book/preface#ex-preface-bell) |
| `put!` | self, key, value | the value; the toy's own state keeps it | changes the toy | [bell](https://plazmi.gg/book/first-toy#ex-bell) |
| `state` | self, key?, otherwise? | the toy's state, or one key of it | reads | [brief-toy](https://plazmi.gg/book/words-in-brief#ex-brief-toy) |
| `refuse` | self, text | nothing; the toy says no, and nothing it did is kept | changes the toy | [stone-pile](https://plazmi.gg/book/a-small-game#ex-stone-pile) |
| `colour` | a colour name or #hex | the hex, or nil when the hour's three changes are used | changes the toy | [mood-stone](https://plazmi.gg/book/dawn#ex-mood-stone) |
| `color` | a colour name or #hex | as colour | changes the toy | [brief-toy](https://plazmi.gg/book/words-in-brief#ex-brief-toy) |
| `glow-colour` | a colour name or #hex | as colour, for the glow | changes the toy | [brief-toy](https://plazmi.gg/book/words-in-brief#ex-brief-toy) |
| `glow-color` | a colour name or #hex | as glow-colour | changes the toy | [brief-toy](https://plazmi.gg/book/words-in-brief#ex-brief-toy) |
| `my-colour` | nothing | its maker's colour | reads | [mood-stone](https://plazmi.gg/book/dawn#ex-mood-stone) |
| `my-color` | nothing | as my-colour | reads | [brief-toy](https://plazmi.gg/book/words-in-brief#ex-brief-toy) |
| `my-glow` | nothing | its maker's glow | reads | [brief-toy](https://plazmi.gg/book/words-in-brief#ex-brief-toy) |


---

Before: [Style](https://plazmi.gg/book/style.md). Next: [Other spellings](https://plazmi.gg/book/spellings.md). Contents: https://plazmi.gg/book.md
