invoke

inline fun <T, V : Value<T>> invoke(values: List<Value<*>>, noinline factory: (Any) -> Value<*>? = { null }): V

Invokes the lambda action with given arguments and converts the result to a static type.

Return

the result of the lambda action, as a statically typed value

Parameters

values

arguments of the lambda action

factory

conversion applied when the action returns a dynamically typed result, mirroring what a native function parameter of the same type would use. Defaults to no conversion, which suits actions whose result is already typed.

Type Parameters

T

unwrapped type to convert the resulting dynamic value to

V

wrapped value type (which wraps T) to convert the resulting dynamic value to


inline fun <T, V : Value<T>> invoke(vararg values: Value<*>, noinline factory: (Any) -> Value<*>? = { null }): V

See also