Part I. The language · this page as markdown
Forms and values
Everything you write in Plazmi Lisp is a form. A form is either a value, like 3 or "Ting.", or a list in parentheses that works a value out, like (+ 1 2). This chapter is about both.
Values answer themselves #
A value is the simplest form. Send one, and it answers itself:
42
2.5
-7
"Ting."
true
false
nil
:rain42
2.5
-7
"Ting."
true
false
nil
:rainA plan can hold several forms, one after another, and each answers in turn. Here are the kinds of plain value:
- Numbers: whole numbers like
42and-7, and decimals like2.5. - Text in double quotes:
"Ting.". Text can hold any characters, quote marks too, written\"inside. - **
trueandfalse.** - **
nil**, which means nothing: no value at all. - Keywords, which start with a colon:
:rain,:rings,:front. A keyword is a name used as a value. You will use them for the keys of maps and for choices like which side of the house.
Values that hold values #
Four kinds of value hold other values:
[1 2 3]
{:rings 0 :colour "rose"}
#{"basil" "mint"}
#"[a-z]+"[1 2 3]
{:rings 0, :colour "rose"}
#{"mint" "basil"}
#"[a-z]+"- A list in square brackets,
[1 2 3], holds values in order. (Lisp calls this a vector; this book calls it a list, as the language's table does.) - A map in braces,
{:rings 0 :colour "rose"}, holds keys and their values, in pairs. When Plazmi prints a map it puts a comma between the pairs; you can leave the commas out, and the book does. - A set,
#{"basil" "mint"}, holds values with no order and no repeats. It prints them in an order of its own, as here. - A pattern,
#"[a-z]+", describes text to look for. Chapter 3 uses them.
Lists, maps and sets can hold any values, other lists and maps among them: {:guests ["@mira" "@cairn"] :open true} is a map whose :guests is a list of text.
Lists that work something out #
A list in parentheses is a call. Its first word says what to do, and the rest are what that word takes:
(+ 1 2 3)
(* 6 7)
(- 10 4)
(max 3 9 4)
(str "Hello, " "Mira")6
42
6
9
"Hello, Mira"+ adds every number it is given. str joins its values into one text. The word always comes first, so there is never any question of which comes before which: (+ 1 2 3) is the whole sum.
Inside out #
Calls go inside calls. Plazmi works out the innermost first, and passes each answer outwards:
(+ (* 2 3) (* 4 5))
(str "That's " (+ 1 2) " rings.")26
"That's 3 rings."Read (+ (* 2 3) (* 4 5)) from the inside: (* 2 3) is 6, (* 4 5) is 20, and (+ 6 20) is 26. That is the whole grammar of the language. Everything else is which words there are.
What kind of value #
type says what kind a value is, in a word:
(type 3)
(type 2.5)
(type "three")
(type :three)
(type [3])
(type {:n 3})
(type nil):number
:number
:text
:keyword
:vector
:map
:nilA list as data #
Sometimes you want a list in parentheses as a value, not a call. A quote mark in front stops it being called:
'(1 2 3)(1 2 3)You will rarely need this: square brackets are the usual way to write a list.
Notes to yourself #
A semicolon starts a note that runs to the end of the line. Plazmi reads past it:
;; how many legs on three stools
(* 3 3) ; three each9Notes are for whoever reads the plan as you sent it. When Plazmi keeps a toy, it keeps the Lisp, not the notes (chapter 16).
A word that isn't one #
Every word that starts a list is checked against the language's table before anything runs. A word the table hasn't got stops the whole plan, and the reply names it, with the nearest words that are:
(print "hello")That plan uses print, which isn't one of its words, so nothing in it ran. Nearest: …Nothing ran, and nothing changed. Plazmi has no printing: a form answers its value instead, as every example in this chapter did.
Try it #
- Send a plan that answers the number of hours in a week, worked out with
*. - Write one form that answers the text
"3 bells, 2 chimes", usingstrand two sums. - What does
(type (str 1 2))answer? Work it out, then send it. - Write a map for a toy that has rung 4 times and is called "Bell".
Recap #
- A form is a value or a list. A value answers itself; a list calls its first word on the rest.
- Values: numbers, text,
true,false,nil, keywords, lists[…], maps{…}, sets#{…}and patterns#"…". - Calls nest, and are worked out from the inside.
- A word not in the table stops the plan before anything runs, and the reply names it.
Next, names: how to give a value a name and use it.
Written by Claude, Plazmi's writer, for Plazmi, a service of Manatee Media LLC. Text © 2026 Manatee Media LLC. The examples are free to copy, change and run.