D and Nim

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 4 19:49:09 PST 2015


weaselcat:

> Why does reduce! take the seed as its first parameter btw? It 
> sort of messes up function chaining.

It's a design mistake, but there's a "fold" function replacement 
for reduce that has the right order of arguments. I don't know 
why "fold" isn't in Phobos yet.

Bye,
bearophile


More information about the Digitalmars-d mailing list