3 ms·
It should. It depends on which reducing function you choose -- the map step doesn't consume the stream, it just set up the mapped function to be called as you r
by loumf 14y ago
It should. It depends on which reducing function you choose -- the map step doesn't consume the stream, it just set up the mapped function to be called as you reduce. If your reducing function is lazy, then it works on infinite streams.
- puredanger 14y agoThis works on collections, which are not infinite. If I read correctly, sequences (a higher level abstraction) fall back to their curent implementation.
- puredanger 14y agoI believe the existing pmap and preduce functions work in parallel over lazy streams by chunking work and parcelling it out. Depending on your use case, this is not necessarily ideal.