Saying something
println writes a line of output and takes any number of arguments. A line that is just a bare expression has a value — the runner shows it after ⇒. (That's the read-eval-print feel: every line evaluates to something.)
Bindings — the colon from REBOL
Axioma binds a name to a value with a colon: name: value. There is no let, no var, no = — the colon is inherited from REBOL (Carl Sassenrath, 1997), where word: value is the one way to define anything. It's terse and reads like a definition list.
You can also bind several names at once, left-to-right.
Blocks — what [ ] means
Square brackets group a sequence of expressions into a block. A block evaluates to its last expression. This one idea does a lot of work in Axioma: it's how you sequence steps, and — as you'll see next — it's exactly how you write a function body.
(When a bracket holds comma-separated items instead, like [1, 2, 3], it's an array literal. Newlines or a single trailing expression make it a value-block.)
Functions
A function is just a value — you bind it with : like anything else, and its body is a [ ] block. Call it with parentheses.
There's an optional named form, and a lightweight lambda … => for short functions:
Functions can call themselves (recursion), and can return other functions that capture their surrounding scope (closures):
Composition — functions over collections
Functions are first-class, so you pass them around. map applies one to every item; filter keeps what matches; reduce folds a collection to a single value.
And because a function is a value, you can compose small ones into a pipeline:
Sets & comprehensions
Sets are first-class, and set-builder notation comes straight off the page. Read { n | n <- xs, cond } as “the set of n drawn from xs such that cond.” (mod is the word form of %.)
The full algebra of sets is there too — union ∪, intersection ∩, difference \:
Quantifiers — logic that evaluates
The universal ∀ and existential ∃ quantifiers range over a set and evaluate to a truth value. Write them as words…
…or as the symbols mathematicians actually write — the same AST either way:
Logic & rules
Declare a relation, assert some facts, and write rules with <== (“holds when”). Rules can be recursive — here the engine computes the full transitive closure of a graph, Datalog-style, iterating to a fixpoint.
Concepts & the copula is
A concept is a class. Subclass with extends, make an instance with the indefinite article a (or an), and classify with Russell's copula is — which Axioma keeps precise: membership (∈) for an instance, and class-inclusion (⊆) between two concepts.
Beyond true and false
Real knowledge is sometimes missing and sometimes contradictory. Axioma builds that in: Belnap's four-valued logic has a value for “asserted and denied” (⊤⊥), and Kleene's three-valued logic handles the unknown (om) without collapsing.
That's the core.
You've met bindings, blocks, functions, sets, logic, concepts and many-valued truth — enough to read most Axioma. Take any example into the full playground and keep going.
The full Axioma Manual and textbook are coming to the site — this tutorial is the slimmed-down tour.