haxetink / tink_streams

Streams from the future. With lasers, of course ... whoaaaaa!!!!
The Unlicense
12 stars 9 forks source link

Wrote a scan function #1

Closed 0b1kn00b closed 7 years ago

0b1kn00b commented 8 years ago

I've got a few other things like materialize, from the Rx codebase, merge, concatenate.

0b1kn00b commented 8 years ago

It might be worth putting a fold on StreamStep as well, check Chunk, it's the same structure.

back2dos commented 8 years ago

Is there any particular reason for closing this?

I am interested in general, but I think the implementation could be terser and could be added right to Stream for convenience. As for the rest, feel free to open other issues.

0b1kn00b commented 8 years ago

Well, why didn't you say? I figured you were trying to keep it lean. I'll come back round to it.

back2dos commented 8 years ago

I do definitely have a religious inclination towards leanness, but my main reason for keeping it in this case is that I am still figuring out a few things, with a relatively strong focus on performance. I was able to get quite a boost with the recent version, which is really constructed around forEach, i.e. map, filter, fold and even next are built on it. The converse of building forEach on next still exists though, but that only changes things on the lowest layer.

I am interested in fleshing out the API within reason, but I think this may not be the best time to do it, and I am almost certain that I'm not the best person to do it ;)

0b1kn00b commented 8 years ago

Hmm. Reducers in Elm seem to be T->R->R

0b1kn00b commented 8 years ago

I noticed you put a Maybe implementation in the recent commit, I published one on haxelib a few days ago. It relies only on stax pointwise and stax tuple which are rather compact.

back2dos commented 7 years ago

Closing this now, because we're destroying everything anyway ^^