Module

tuck/function

src/tuck/function.pooka

A template can ask for a function only when its host has registered one. Namespaces are names, not runtime modules: time.now can use an injected build clock without giving the template access to arbitrary Pooka calls.

API reference

class

Function

src/tuck/function.pooka:14
class Function(run: fn(List(Json)) -> Result(Json, String))

Arguments and results use the same typed values as template data. A host validates its argument contract and returns an explanatory error on failure.

field

run

src/tuck/function.pooka:14
run: fn(List(Json)) -> Result(Json, String)
INFERREDfn(List($package/pooka_json/pooka/json.Json)) -> Result($package/pooka_json/pooka/json.Json, String)
constructor

new

src/tuck/function.pooka:14
INFERREDfn(fn(List($package/pooka_json/pooka/json.Json)) -> Result($package/pooka_json/pooka/json.Json, String)) -> tuck/function.Function
function

valid_name

src/tuck/function.pooka:17
valid_name(name: String) -> Bool
INFERREDfn(String) -> Bool

Namespace components are identifiers. super belongs to block inheritance.