UI module

state

procedure · 1 overloadsince 0.31.0Source

The retained value of type T stored on a node, created zeroed on first use and kept until the node leaves the tree.

state :: (node: *Node, $T: Type) -> *T

The retained value of type T stored on a node, created zeroed on first use and kept until the node leaves the tree.

Parameters

node: *Node
the node that keeps the value.
$T: Type
the type stored. A node holding a value of another size has it replaced by a zeroed one.

Returns

*T

See also