# Other spellings

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

The reader takes more forms than the table lists, each read as one the table has. These are the same table the language's own page shows:

| Written | Read as |
|---|---|
| `(when t a b)` | `(if t (do a b) nil)` |
| `(when-not t a)`, `(if-not t a b)` | `(if (not t) …)` |
| `(if-let [x e] a b)`, `(when-let …)`, `(if-some …)` | `(let [x e] (if x a b))` |
| `(-> x (f a))`, `(->> x (f a))`, `(as-> …)` | `(f x a)`, `(f a x)`, a `let` |
| `(some-> …)`, `(cond-> …)` | `let` and `if` |
| `#(+ % 1)` | `(fn [p1] (+ p1 1))` |
| `(:k m)` | `(get m :k)` |
| `(#{"a" "b"} x)` | `(get #{"a" "b"} x)` |
| `(let [[a b] l] …)`, `{:keys [a]}` | `(nth l 0 nil)`, `(get m :a)` |
| `(doseq [x l] …)`, `(dotimes [i n] …)` | `(run! (fn [x] …) l)` |
| `(for [x l] e)` | `(map (fn [x] e) l)` |
| `(condp = x 1 a b)` | `(let […] (cond (= 1 x) a :else b))` |
| `'(1 2)` | `(list 1 2)` |

## A worked-out step

The home's words, and `design` and `defdance`, take their values written out. To work one out, the form is:

```clojure
(apply roof (check "a label" :roof {:pitch (+ 30 10)}))
```

`check` takes a label (any short text), the step's own name as a keyword, and a map of its fields; it holds the fields to the same rules as when they're written out, and answers what the word takes. The steps and their fields: `:roof` (`:type`, `:pitch`, `:overhang`, `:mass`), `:floor` (`:room`, `:material`, `:colour`), `:window_box` (`:side`, `:colours`), `:paint` (`:what`, `:shade`), `:room` (`:name`, `:x`, `:z`, `:width`, `:depth`, `:level`), `:porch` (`:porch_depth`), `:draw_design` (`:name`, `:palette`, `:rows`) and `:make_dance` (`:name`, `:moves`, `:title`). Chapter 15 has it at work.

## What comes back when a toy is read

A toy is kept as Lisp written in the plainest spelling of each form, so a toy read back with `check` (what `toy_lisp`) may be spelt differently from how it was sent, and means the same:

- `(:k m)` comes back `(get m :k)`.
- `when` comes back as an `if` with `nil` for otherwise, and `when-not` as an `if` of `not`.
- A verb's body of several forms comes back with each in a `(do …)`.
- `#(…)` comes back as a `fn`, its `%` named.
- Taking apart (`[a b]`, `{:keys [k]}`) comes back as the `get`s and `nth`s it stands for.
- Notes after `;` are gone; the layout is a part a line.

Sent back unchanged, the text makes the same toy.


---

Before: [The word table](https://plazmi.gg/book/reference.md). Next: [Limits](https://plazmi.gg/book/limits.md). Contents: https://plazmi.gg/book.md
