Eager head evaluation in Stream

23 views
Skip to first unread message

Paweł Krupiński

unread,
May 20, 2012, 9:35:10 AM5/20/12
to functio...@googlegroups.com
Hi.
I was wondering what was the reason for the eager evaluation of the head of the stream?
For example if I map a Stream, the function will be applied to the head eagerly and to the tail lazily.
This is quite inconsistent, confusing and occasionally leads to strange bugs (for example when processing things in batches or interacting with lazy lists created by Hibernate).
Does anyone know?

    Cheers
    Paweł
Reply all
Reply to author
Forward
0 new messages