EffectTalk

Stream.fromIterable and runCollect

`Stream` processes data incrementally. Use `Stream.fromIterable` to create from a list, and `Stream.runCollect` to gather results into a `Chunk`.

Streams are lazy - they only process as much as you consume.

  • Use `Stream.fromIterable(array)` to create a stream
  • Use `Stream.map` to transform elements
  • Use `Stream.runCollect` to get a Chunk of results
Loading code editor...