(...ArgsT) -> ReturnT.
First-class functions
Pass a function as a callback:myPlus has the type (int, int) -> int. A function demo, for example, has the type () -> void.
Functions can be assigned to variables:
Lambda functions
Tolk supports lambda functions:a and b are inferred as int from the invokeMath declaration. When parameter types cannot be inferred, they must be specified:
Low-level TVM continuations
Continuations are executable cells representing TVM bitcode. A callable is a typedcontinuation.
Tolk provides the low-level type continuation. For example, the TVM register c3 contains the smart contract code. Some functions are available in the standard library:
Stack layout and serialization
A callable is backed by the TVMCONT. Callable values cannot be serialized.