This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 9/16/2026.
Interpreter.define
~import std/interpreter.defineKoru Standard Library: the `define` part of interpreter.kz.
interpreter.define.kz · 1 tors
Koru Standard Library: the `define` part of interpreter.kz.
Joined via `~part define` in interpreter.kz; merged into the interpreter
module at load.
The REPL define: install a subflow declaration into the session's
defined-flows table, making it a verb callable on subsequent runs.
A definition is `tor name { args }` followed by the impl flow
`name = <body>`. The body is stored as SOURCE (durable) and re-parsed per
dispatch; every call it makes runs through the same possession machinery,
so a defined flow can never reach beyond what the session holds.
The definition-time analyses (declared obligations must match the body's
real behavior; every call must be within the session's scopes) are the
richer guarantee and are rungs of the stance, not this slice; call-time
possession enforcement is the floor and is already structural.
// Koru Standard Library: the `define` part of interpreter.kz.
// Joined via `~part define` in interpreter.kz; merged into the interpreter
// module at load.
// The REPL define: install a subflow declaration into the session's
// defined-flows table, making it a verb callable on subsequent runs.
// A definition is `tor name { args }` followed by the impl flow
// `name = <body>`. The body is stored as SOURCE (durable) and re-parsed per
// dispatch; every call it makes runs through the same possession machinery,
// so a defined flow can never reach beyond what the session holds.
//
// The definition-time analyses (declared obligations must match the body's
// real behavior; every call must be within the session's scopes) are the
// richer guarantee and are rungs of the stance, not this slice; call-time
// possession enforcement is the floor and is already structural.
~[retain] pub tor define { source: string, defined: *DefinedFlows }
| defined string
| parse-error { message: string, line: u32, column: u32 }