Re: product() unexpected result
- Posted by _tom (admin) Apr 29, 2021
- 941 views
yup,
? product( {} )
0
On this side of the pond, everything is backwards?
global function Product(object a) atom res = 0 if atom(a) then res = a elsif length(a) then res = 1 for i=1 to length(a) do res *= product(a[i]) end for end if return res end function ? Product( {} )
0
The concrete example was a bit stretched, but in context of my local city contracts it makes a lot of sense.
''Math'' thinking suits me better.
be well
_tom