In six lessons, you will run your first program, write a house style rule for a publisher, and test its boundary cases. Start with First Program and follow the lessons below.
Use the Playground in a modern browser. Local installation is optional. Familiarity with function calls and true-or-false questions is enough to begin.
Try one expression
(+ 2 3)Result
5The first lesson puts this sum inside a list, then asks you to change 3 to
8. You will see the last item change from 5 to 10.
In a call, the operation comes first and the inputs follow.
(operation input1 input2 ...)Parentheses group a form, a piece of program syntax. Most forms call a
procedure, such as +. Special forms such as define, if, and quote
control how their contents are evaluated. If the notation is unfamiliar, read
Reading the Parentheses. It leads back
to the first program.
The six lessons
1. First Program
Run a program, change its result, and fix a missing parenthesis. You can also
save the source as a .lspx file and run it locally.
2. Values, Names, and Procedures
Give values names with define and let. Create and call a procedure, then
follow the order of calls inside other calls.
3. Code Is Data
Compare a call with a quoted list. Use the quote to keep an expression as data, and see how a program can work with that data.
4. Data, Conditions, and Decisions
Choose an answer with if and cond. Only #f counts as false.
Return a list that names the decision and its reason.
5. First Decision Rule
Write a publisher's house style rule from the pieces you have learned. Test 2 lines left, 1 line left, and a chapter heading to see when the answer changes.
Build the first decision rule →
6. Where Your Program Runs
Identify the engine running your program, then choose the Playground, npm, or Native for your next task.
Look up syntax as you go
Syntax at a Glance collects examples of values, names, calls, procedures, conditions, and quoted data. It also covers collections such as lists and procedures that take other procedures as inputs. Use its links to find the relevant manual page when you need more detail.
After the course
Choose a guide for your next task.
- Write more Lispex. Read Source Text and Reader, then follow the language guides.
- Run a rule locally. Read Run Lispex in Your Application and Downloads.
- Save source in an image and recover it. Try Lispex Images.
- Check a signed decision and run it again. Read the Lispex Vouch overview.
Use the page numbers to find your place. After the course, follow the links for the task you want to do.