reduceRight method

A reduceRight(
  1. Function2<A, A, A> op
)

Reduces from right to left. Throws if empty.

Implementation

A reduceRight(Function2<A, A, A> op) => switch (this) {
  final IndexedSeq<A> seq when seq.length > 0 => _foldr(seq, op),
  _ when knownSize == 0 => throw UnsupportedError('empty.reduceLeft'),
  _ => _reversed().reduceLeft((x, y) => op(y, x)),
};