12.2. instance_function function annotation
The INSTANCE_FUNCTION module provides the [instance_function] annotation
for creating bound method-like functions. It captures the self reference
at call time, enabling object-oriented dispatch patterns in daslang.
All functions and symbols are in “instance_function” module, use require to get access to it.
require daslib/instance_function
12.2.1. Function annotations
- instance_function
[instance_function(generic_name,type1=type1r,type2=type2r,…)] macro creates instance of the generic function with a particular set of types.