StreamData Reduction?

There’s a nice map function for StreamData,

https://hexdocs.pm/stream_data/StreamData.html#map/2

but how do people do reduction? I.e. something like Enum.reduce?

Suspect it would make more sense than some sort of general recursion…

I see a similar question here.

StreamData generators are Stream.ts and implement the Enumerable protocol, so the functions in the Stream and Enum modules work as normal :slight_smile:

https://hexdocs.pm/stream_data/StreamData.html#module-enumeration

1 Like