compileFunction2
Compiles a string expression into a lambda function with two parameters.
This function takes an expression as a string, as well as two parameter names, and returns a lambda that evaluates the expression with the provided parameter values. Optionally, a map of constants and custom functions can be provided for use in the expression.
Return
A lambda function that takes two parameters of types T0 and T1 and returns a result of type R, based on the compiled expression.
Parameters
The type of the first parameter.
The type of the second parameter.
The return type of the resulting lambda function.
The string expression to compile.
The name of the first parameter in the expression.
The name of the second parameter in the expression.
A lambda function that provides constant values by variable name. Defaults to returning null for all names.
The custom functions available in the context of the expression. Defaults to an empty set of functions.
Throws
if either parameter name exists within the constants map.