nessos / Streams

A lightweight F#/C# library for efficient functional-style pipelines on streams of data.
http://nessos.github.io/Streams/
Other
381 stars 46 forks source link

Equivalent to scan? #10

Closed MiloszKrajewski closed 9 years ago

MiloszKrajewski commented 9 years ago

I could not find scan, am I missing some other method which does the same but has different name? I would like to implement let's say, running sum, so for input stream { 1; 2; 3; 4; 5 } it emits { 1; 3; 6; 10; 15 }. So it needs to behave both like map (emitting data as it arrives) and fold (passing state)

palladin commented 9 years ago

Yes, scan is a very important combinator that we are currently missing. I will implemented it as soon as possible.

palladin commented 9 years ago

Fixed in https://github.com/nessos/Streams/commit/553ff37ad5ece2be0922a67ad103886834385787