Sequence
cleanup: fold
vs reduce
, more powerful scan
#3316
Labels
Sequence
cleanup: fold
vs reduce
, more powerful scan
#3316
foldf
is redundant withreduce
, andfold*
generally provides the same functionality likereduce*
, so we should think of better names, e.g.,reduce(R type, init R, f (R,T) -> R | abort R) R
should bereduce_or_abort
foldf(B type, f (B,T)->B, e B)
should bereduce(B type, init B, f (B,T)->B)
fold1(f (T,T)->T)
should bereduce1(f (T,T)->T)
fold(m Monoid T)
should bereduce(m Monoid T)
Similarly, we need a similar set for functions for
Sequence.scan
.The text was updated successfully, but these errors were encountered: