On 20/09/10 11:30, Axel Polleres wrote: >> > Just define: >> > Sum(S) = op:numeric-add(S0, Sum(S1..n)) when|S| > 1 if S0 is a number >> > Sum(S) = op:numeric-add(0, Sum(S1..n)) when|S| > 1 if S0 is not a number > is not as straightforward as Flatten op:numeric-add, but could be an option. > I don't understand that. The flatten operation is independent of the specific aggregation - it doesn't remove non-numbers: [[ Definition: Flatten The Flatten(M) function takes a multiset of lists, M {(L1, L2, ...), ...}, and returns the multiset given by the multiset union of { Li | L in M } for all i in L. ]] Could be changed to take a condition on the members produced. Avg() works if Sum() does. AndyReceived on Monday, 20 September 2010 13:24:14 GMT
This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:43 GMT