a-foundation/src/main/java/com/ajjpj/afoundation/collection/ACollectionHelper.java
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;
    }
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;
    }
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.

@param <T> element type of the collection
@param <R> result type
Applies a binary operator to a start value and all elements of this list going left to right .