See it run
LISPEX
((lambda (x) (if #t x 0)) 42)Observed result
OUTPUT
42How to reason about it
ifhas a mandatory else arm;beginand procedure bodies preserve left-to-right order.lambdasupports fixed and dotted formals;set!mutates an existing cell;defineupdates or creates a top-level cell.quotereturns immutable literal data; runtime does not evaluate quoted elements.
Form contracts
| Form | Arity / evaluation | Result or fault |
|---|---|---|
| quote | 1 datum; no element evaluation | immutable datum |
| if | test, consequent, alternate; test first | selected branch packet; E320 if test is not one value |
| lambda | formals plus 1..N body forms | closure; E302 when applied with wrong arity |
| set! | name and single-value RHS | zero values; E303 if unbound |
| let / letrec | binding list plus 1..N body forms | last body packet; E321 on uninitialized letrec read |
A common mistake
Surface convenience forms belong to the derived-form reference.
Keep going
Use this page while writing code. For a guided explanation, return to the syntax map or the corresponding manual.