Raul Miller-4 wrote:
> 
> 
>   fold=: /
> 

It is a bit more complicated:

    foldl1 =: /
    foldr1 =: ~/(@:|.)

as in:

    - foldl1 1 2 3 4  NB. (1-(2-(3-4)))
_2

    - foldr1 1 2 3 4  NB. (((1-2)-3)-4)
_8

but I (still) don't think there is an easy way to define foldl and foldr in
J.

-- 
View this message in context: 
http://www.nabble.com/Fold-%28Wikipedia%29-tp23508546s24193p23531725.html
Sent from the J Chat mailing list archive at Nabble.com.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to