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.mapto transform elements - Use
Stream.runCollectto get a Chunk of results
Loading code editor...