concepts.dsl.function_domain.resolve_lambda_function_type#

resolve_lambda_function_type(fn_domain, lambda_expression, typing_cues)[source]#

Resolve the function type of a lambda expression. It enumerates all possible types for the arguments and the return value, and then checks whether the lambda expression satisfies the type constraints. See the docstring for FunctionDomain.lam() for usage.

Parameters:
  • fn_domain (FunctionDomain) – The function domain.

  • lambda_expression (Callable) – The lambda expression.

  • typing_cues (Dict[str, str | TypeBase]) – The typing cues. The key is the variable name, and the value is the type. If you want to specify the typing cue for the return type, use the key ‘return’.

Returns:

The resolved function type.

Return type:

FunctionType