Question
Function reduce() and list of maps
Hi,
i have the following code
a!localVariables(
local!sensor: {
a!map(data: { 125, 92, 22, 63, 73, 28, 19 }),
a!map(data: { 35, 65, 92, 22, 63, 73, 28 }),
a!map(data: { 2, 35, 65, 22, 63, 73, 18, 29 }),
a!map(data: { 9, 35, 65, 63, 35, 28, 19 })
},
reduce(fn!sum, 0, local!sensor.data)
)
Using excel the sum of all numbers is 1361.
Using reduce() in Appian, the sum is 1332 that is 1361-29.
The value 29 is the eighth element of the third map.
Every map has 7 elements.
Why the reduce() function exlude the element 29?
