-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Labels
Milestone
Description
In this example (https://github.com/ReactiveX/RxJava/wiki/Mathematical-and-Aggregate-Operators#reduce)
getComingSoonSequence()
.reduce([], { theList, video ->
theList.add("'" + video.getTitle() + "' (" + video.getOpen() + ")");
return(theList);
}).subscribe({ println("Coming Soon: " + it) });
Passing a list into the reduce method seems like it would only be valid if you could guarantee that the Observable would only be subscribed to once. Why isn't there a reduce method that takes a Supplier as its first argument?