Language
Rituals (Functions)
Rituals are first-class values. Define one with ritual, return with give.
ritual add(a, b) {
give a + b
}
proclaim add(2, 3)
A ritual with no give returns naught. Rituals close over their defining scope and can be passed around like any value.
Divined rituals
A divined ritual has no body — the entire implementation is delegated to the oracle. Its arguments become the operands; the oracle invents the result:
ritual sentiment(text) divined
proclaim sentiment("this product is amazing") // -> e.g. "positive"
When a ritual is called, the callee being an oracle value propagates; but an oracle argument binds to the parameter (it does not poison the call) so the body can inspect it with
attempt.