Skip to contents

Reduces all elements of the input list into a single scalar value by executing the lambda function on a running result and the next list element. The lambda function has an optional initial_value argument.

Usage

list_reduce(list, lambda, initial_value)

Arguments

list

ANY[]

lambda

LAMBDA

initial_value

ANY

Value

ANY

Overloads

  • list_reduce(list = `ANY[]`, lambda = LAMBDA)

  • list_reduce(list = `ANY[]`, lambda = LAMBDA, initial_value = ANY)

SQL examples

list_reduce([1, 2, 3], lambda x, y : x + y)