public static <T, R> Future<R> accumulateSuccess(final Iterable<Future<T>> fts, final Reducer<R,T> reducer) {
       return Future.of(CompletableFutures.accumulateSuccess(ReactiveSeq.fromIterable(fts).map(Future::getFuture), reducer));
    }
public static < T , R > Future < R > accumulateSuccess ( final Iterable < Future < T > > fts , final Reducer < R , T > reducer ) { return Future . of ( CompletableFutures . accumulateSuccess ( ReactiveSeq . fromIterable ( fts ) . map ( Future :: getFuture ) , reducer ) ) ; }
Asynchronously accumulate the results only from those Futures which have completed successfully.
Also @see {@link Future#accumulate(Iterable, Reducer)} if you would like a failure to result in a Future
with an error
<pre>
{@code

Future<Integer> just =Future.of(CompletableFuture.completedFuture(10));
Future<Integer> none = Future.ofError(new NoSuchElementException());


Future<PersistentSetX<Integer>> futures = Future.accumulateSuccess(Seq.of(just,none,Future.ofResult(1)),Reducers.toPersistentSetX());
Future[PersistentSetX[10,1]]
}
</pre>

@param fts Collection of Futures to accumulate successes
@param reducer Reducer to accumulate results
@return Future asynchronously populated with the accumulate success operation