public static < T , R , E extends Throwable > R foldRight ( List < T > coll , R startValue , AFunction2 < R , ? super T , R , E > f ) throws E { R result = startValue ; ListIterator < T > i = coll . listIterator ( coll . size ( ) ) ; while ( i . hasPrevious ( ) ) { result = f . apply ( result , i . previous ( ) ) ; } return result ; }
Applies a binary operator to a start value and all elements of this list going left to right .