Created
October 25, 2015 17:38
-
-
Save kellegous/2853ff50260db46e8dc6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public Stream<Verse> allVerses() { | |
| return books().stream().reduce( | |
| Stream.empty(), | |
| (sa, b) -> b.chapters().stream().reduce( | |
| sa, | |
| (sb, ch) -> Stream.concat(sb, ch.verses().stream()), | |
| (sb, sc) -> Stream.concat(sb, sc)), | |
| (sb, sc) -> Stream.concat(sb, sc)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment