🔵 🔵 🔵


Primary

၊၊||၊|။

reduce() ⚬ᵈᵛ|Documentation|1st|20260605162221-00-⌔

Functions - Dataview#reducearray-operand

reduce(array, operand)

A generic function to reduce a list into a single value, valid operands are "+", "-", "﹡", "/" and the boolean operands "&" and "|". Note that using "+" and "﹡" equals the sum() and product() functions, and using "&" and "|" matches all() and any().

reduce([100, 20, 3], "-") = 77
reduce([200, 10, 2], "/") = 10
reduce(values, "﹡") = Multiplies every element of values, same as product(values)
reduce(values, this.operand) = Applies the local field operand to each of the values
reduce(["⭐", 3], "﹡") = "⭐⭐⭐", same as "⭐" ﹡ 3
 
reduce([1]), "+") = 1, has the side effect of reducing the list into a single element

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •