tokiwa-software / fuzion

The Fuzion Language Implementation
https://fuzion-lang.dev
GNU General Public License v3.0
46 stars 11 forks source link

`Sequence` cleanup: `fold` vs `reduce`, more powerful `scan` #3316

Open fridis opened 2 months ago

fridis commented 2 months ago

foldf is redundant with reduce, and fold* generally provides the same functionality like reduce*, so we should think of better names, e.g.,

Similarly, we need a similar set for functions for Sequence.scan.

maxteufel commented 1 month ago

I'm not sure about this, in most languages, fold seems to be the more general variant of reduce by taking an additional accumulator parameter.

We should certainly make this more consistent though.