Is Stream.join supposed to be lazy?

31 views
Skip to first unread message

Joel Shellman

unread,
Feb 24, 2012, 5:16:47 PM2/24/12
to functio...@googlegroups.com
I'm using it and it appears that it's evaluating the Streams when I
call join. I need a lazy flattening of Streams. Is there something
that does this, or should I write my own?

Runar Bjarnason

unread,
Feb 26, 2012, 2:17:15 PM2/26/12
to functio...@googlegroups.com
The problem here is that Semigroup is strict in both of its arguments,
so the current implementation of Stream.join is incorrect. It should
really be implemented as an unfold. If you want to tackle it, go ahead
and make a pull request.

Runar

> --
> You received this message because you are subscribed to the Google Groups "Functional Java" group.
> To post to this group, send email to functio...@googlegroups.com.
> To unsubscribe from this group, send email to functionaljav...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/functionaljava?hl=en.
>

Reply all
Reply to author
Forward
0 new messages