Generalized transformation of a Stream<X> into a Stream<Y>, with lazy evaluation and stateful transformation functions
zhong.j.yu at gmail.com
Fri Feb 22 09:44:24 PST 2013
A cheap workaround I can think of is to append a sentinel EOF object
at the end of stream; the flat mapper reacts to EOF and conclude its
job. This is in line with the idiom of parsing InputStreams.
More information about the lambda-dev