fs2 icon indicating copy to clipboard operation
fs2 copied to clipboard

Add accumulating variant of `Stream.debounce`

Open m50d opened this issue 3 years ago • 5 comments

I don't know if there's enough demand/need for this, but I had a use case where I needed something like debounce but that keeps all the elements of the stream, and it seemed generic enough to be worth sharing.

m50d avatar Oct 27 '22 02:10 m50d

Appreciate there were a number of failures that were my fault, but I can't understand the latest one (native linking failure) - what's the issue here?

m50d avatar Oct 27 '22 04:10 m50d

Just a flake :)

armanbilge avatar Oct 27 '22 04:10 armanbilge

Any thoughts on NonEmptyChain versus Chunk here?

mpilquist avatar Nov 19 '22 14:11 mpilquist

It wasn't a particularly thought-through choice, just the type I reached for. For my specific use case a type that expresses that it's always non-empty is helpful, but happy to switch it to Chunk if you think that's more useful in the general case.

m50d avatar Nov 20 '22 22:11 m50d

OK cool, I think we should switch to Chunk then. There are lots of APIs that would benefit from a NonEmptyChunk indication, though we tried that for a while and it didn't end up working out that well.

mpilquist avatar Nov 21 '22 13:11 mpilquist