language · language ·
Function values, lambdas, and local functions
Yeho has reserved syntax for typed function values and function(...) lambdas, but the feature is not in the Kyber product path.
Use ordinary named top-level functions in product code. Explore function values only through the explicit comparison oracle.
function of ParamType to ReturnType
function(Type name) -> Type { ... }Status: 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