language · keyword ·
function
Describe an oracle-only function value or lambda
Use ordinary named top-level functions in product code. Explore function values only through the explicit comparison oracle.
functionStatus: generated-cpp-only
Function pointer call
Use ordinary named top-level functions in product code. Explore function values only through the explicit comparison oracle.
cpu · complete-program · type checked
Twice(int value) returns int
{
return value * 2
}
AddThree(int value) returns int
{
return value + 3
}
function of int to int callback = Twice
int doubled = callback(21)
callback = AddThree
int shifted = callback(doubled)
if shifted == 45
{
Console.Log("function-pointer-ok")
}
project.mech
package = "tests.compiler.kyber.functionPointerCall"
version = "0.1.0"
backend = "kyber"
osTarget = "windows"
archTarget = "x64"
selfContainedApp = false
Notes and source
Lambdas and local functions are generated-C++ only.
Generic functions are unavailable.
yeho/advanced-features-2026.1.json; conformance lambdas-local-functions