Skip to content

Functions

Functions (engraved spells) combine parameters, explicit return types, and clear ritual bodies.

engrave add(a: arcana, b: arcana) -> arcana {
reveal a + b;
};
forge result: arcana = add(3, 5);
unveil(result); // 8
engrave add_three_numbers(x: arcana, y: arcana, z: arcana) -> arcana {
reveal add(add(x, y), z);
};

Use reveal to emit a value. Omit it to return abyss.

engrave greet() -> rune {
reveal "Hello, AbySS!";
};
engrave factorial(n: arcana) -> arcana {
oracle (n <= 1) {
(boon) => reveal 1;
};
reveal n * factorial(n - 1);
};

engrave evokes carving rituals into stone—clear intent, explicit types, predictable outcomes.