> M> Totally unrelated, I propose a new operation called "accum" in
> M> Enumeration: 
>  Something like apply (in scheme) ?

well, the first Scheme reference manual i found on the net (MIT's) says
the "reduce" function is the actual equivalent: 

(reduce + 0 '(1 2 3 4))
10

(reduce * 0 '(1 2 3 4))
24

but then, i tried in Guile and apply is the same function, different name.

except it accepts a function/closure as a parameter instead of a code
block, and reduce works on lists, not arrays/vectors.

similarly, in APL, the version of the slash operator taking a simple
operator as the left-handed argument is equivalent, but for
multidimensional arrays:

+/1 2 3 4
10

+/2 2 rho 2 3 5 7
5 12

an interesting property of the APL one is that it applies right to left so
that -/ has a different meaning than -+/, that is, instead of returning
the negation of a summation, it returns an alternated sum. you get (-1)^n
for free. similarly, you can do power towers with */ (where * is the power
operator)



Mathieu Bouchard