Last active
March 9, 2016 17:21
-
-
Save davinctor/e4fc79519ff2f50a10e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observable.just(new ArrayList<String>()) | |
.flatMap(new Func1<ArrayList<String>, Observable<String>>() { | |
@Override | |
public Observable<String> call(ArrayList<String> strings) { | |
int N = 10; | |
return Observable.range(0, strings.size() / N) | |
.flatMap(count -> { | |
return Observable.from(strings) | |
.skip(count * N) | |
.take(count * N) | |
.toList(); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment