compileFunction3

fun <T0, T1, T2, R> compileFunction3(expression: String, parameter0: String, parameter1: String, parameter2: String, constants: (String) -> Any? = { null }, functions: TypedFunctionExtensions = TypedFunctionExtensions.EMPTY): (T0, T1, T2) -> R(source)

Compiles a 3-parameter function from a given string expression, allowing dynamic evaluation with specified parameters, constants, and external function extensions.

Return

A lambda function that takes three parameters of types T0, T1, and T2, and returns a result of type R after evaluating the compiled expression.

Parameters

T0

The type of the first parameter.

T1

The type of the second parameter.

T2

The type of the third parameter.

R

The return type of the compiled function.

expression

The string representation of the expression to be compiled.

parameter0

The name of the first parameter referenced in the expression.

parameter1

The name of the second parameter referenced in the expression.

parameter2

The name of the third parameter referenced in the expression.

constants

A lambda function providing constant values for variable names used in the expression. Defaults to a function returning null.

functions

An optional container of external functions that can be called within the expression. Defaults to an empty set of functions.

Throws

If any of the parameter names are found in the constants map.

If there is a syntax error in the provided expression.