Revert optimization which caused nested streams in Stream.flat_map/2 to crash
Module
Stream
37 changes across 26 versions
Changes by version
Ensure Stream.transform/5 respects suspend command when its inner stream halts
Do not raise when Stream.cycle/1 is explicitly halted
Do not halt streams twice in Stream.transform/5
Fix Stream.zip/1 hanging on empty list
Add Stream.duplicate/2 and Stream.transform/5
Add Stream.zip_with/2 and Stream.zip_with/3
Close with correct accumulator in Stream.resource/3 when called for a single-element list
Allow Stream.cycle/1 to be double nested inside Stream.cycle/1
Stream.chunk/2/3/4 is deprecated in favor of Stream.chunk_every/2/3/4 - notice chunk_every does not discard incomplete chunks by default
Reintroduce zipping of any enumerable of enumerables in Stream.zip/1 (regression in v1.6.0)
Add Stream.intersperse/2
Ensure Stream.chunk_while/4 does not emit more elements than necessary when halted
Add Stream.chunk_every/2 and Stream.chunk_every/4 with a more explicit API than Stream.chunk/2 and Stream.chunk/4
Fix stream cycle over empty enumerable
Deprecate Stream.filter_map/3 in favor of Stream.filter/2 + Stream.map/2
Allow consuming multiple items from suspended enumerable in Stream.transform/3
Add Stream.map_every/2 that invokes the given function with every nth item
Introduce Stream.zip/1 to lazily zip multiple entries at once
Ensure Stream.take/2 does not consume next element on :suspend
Deprecate Stream.uniq/2 in favor of Stream.uniq_by/2
Add Stream.with_index/2
Add Stream.dedup/1, Stream.dedup_by/2 and Stream.transform/4
Ensure suspending Stream.flat_map/2 and Stream.transform/3 does not consume unecessary items from the given enumerable
Ensure Stream.flat_map/2 does not consume more items than necessary when piped to another Stream.flat_map/2 that halts in the inner stream
Ensure chunk/4 works correctly when halted
Implement the Inspect protocol for Streams so we do not leak the Stream representation
Fix bug when flat_map is used inside another flat_map with an Enumerable
Add Stream.into/2 and Stream.into/3
Stream.after/1 is deprecated
Add Stream.transform/3
Add Stream.resource/3
Add Stream.zip/2, Stream.filter_map/3, Stream.each/2, Stream.take_every/2, Stream.chunk/2, Stream.chunk/3, Stream.chunk/4, Stream.chunk_by/2, Stream.scan/2, Stream.scan/3, Stream.uniq/2, Stream.after/2 and Stream.run/1
Support Stream.take/2 and Stream.drop/2 with negative counts
The Stream.Lazy structure has changed to accumulate functions and accumulators as we go (its inspected representation has also changed)
Add Stream.unfold/1
Add Stream.concat/1, Stream.concat/2 and Stream.flat_map/2