A relation is a set of clauses
A relation starts with a name and awhere block:
- a head:
double(x) - an equals:
= - a body expression:
x * 2
Pattern matching in the head
Heads can match on literal values.Guards decide between overlapping clauses
When multiple clauses could match, awhen guard can refine the choice.
Recursion (yes, it’s that kind of language)
Because a clause body is “just an expression”, relations can call themselves:Evaluation model (today)
Tide is still alpha, but the interpreter is currently designed to feel:- deterministic (you get the same result every time)
- clause-driven (it picks a clause, then evaluates its expression)
- the relation definition
- the query you ran
- the output you got