Function cel_interpreter::functions::map
source · pub fn map(
ftx: &FunctionContext<'_>,
This: This<Value>,
ident: Identifier,
expr: Expression,
) -> Result<Value, ExecutionError>Expand description
Maps the provided list to a new list by applying an expression to each
input item. This function is intended to be used like the CEL-go map
macro: https://github.com/google/cel-spec/blob/master/doc/langdef.md#macros
§Examples
[1, 2, 3].map(x, x * 2) == [2, 4, 6]