reduce -> fold?

bachmeier via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 29 13:02:23 PST 2016


On Friday, 29 January 2016 at 18:41:46 UTC, Walter Bright wrote:
> Haskell can provide us with good inspiration and background for 
> designing 'fold':
>
>   https://wiki.haskell.org/Fold
>
> Note there is a foldl, foldr, and some more obscure foldt, 
> foldi, and some others.

Once you use names like foldl and foldr, you're headed down the 
slippery slope to Common Lisp naming. Please at least use 
foldLeft and foldRight if you want to go that route.



More information about the Digitalmars-d mailing list