Created
January 18, 2017 22:02
-
-
Save jwkidd3/b25ff5f67cc1e886f8c5fa77644482d0 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<String> values = Observable.just( | |
"first", | |
"second", | |
"third", | |
"forth", | |
"fifth", | |
"sixth" | |
); | |
values.groupBy(word -> word.charAt(0)) | |
.subscribe( | |
group -> group.last() | |
.subscribe(v -> System.out.println(group.getKey() + ": " + v)) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment