src/main/java/org/organicdesign/fp/xform/Xform.java
@Override public <B> B fold(B ident, Fn2<? super B,? super A,B> reducer) {
        if (reducer == null) {
            throw new IllegalArgumentException("Can't fold with a null reduction function.");
        }

        // Construct an optimized array of OpRuns (mutable operations for this run)
        RunList runList = toRunList();
        return _fold(runList, runList.opArray(), 0, ident, reducer);
    }
@Override public <B> B fold(B ident, Fn2<? super B,? super A,B> reducer) {
        if (reducer == null) {
            throw new IllegalArgumentException("Can't fold with a null reduction function.");
        }

        // Construct an optimized array of OpRuns (mutable operations for this run)
        RunList runList = toRunList();
        return _fold(runList, runList.opArray(), 0, ident, reducer);
    }
@ Override public < B > B fold ( B ident , Fn2 < ? super B , ? super A , B > reducer ) { if ( reducer == null ) { throw new IllegalArgumentException ( "Can't fold with a null reduction function." ) ; } // Construct an optimized array of OpRuns (mutable operations for this run) RunList runList = toRunList ( ) ; return _fold ( runList , runList . opArray ( ) , 0 , ident , reducer ) ; }
Provides a way to collect the results of the transformation.
Provides a way to collect the results of the transformation .