Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New operators #111

Open
vxgmichel opened this issue May 13, 2024 · 2 comments
Open

New operators #111

vxgmichel opened this issue May 13, 2024 · 2 comments

Comments

@vxgmichel
Copy link
Owner

vxgmichel commented May 13, 2024

Several operators have been discussed in the issue tracker over the years. Some should probably be added to the library, some would fit well in the examples or the documentation. This issue centralizes those operators and their implementation:

@kniteli
Copy link

kniteli commented Oct 15, 2024

One stream I think should be added to the enhancement list is the never stream.

It's been a bit since I've used this library, but I recall coming up with a way to use never to create a "pausable" stream by switchmapping between it and a "valued" stream. I was show-stopped though by the fact that never's values types are None. I think this is just the wrong type, not only because it severely curtails the usefulness of the never stream, but I don't think it's logically sound either.

Never doesn't yield None values, it yields no values whatsoever. It seems to me it should be valid to place any type you want as the value type of that stream, greatly widening the scope it can be used in without any compromise to soundness.

I don't know if my strange construct would have panned out, but I do think there's a lot of value in that type of stream that can't really be explored right now.

@vxgmichel
Copy link
Owner Author

@kniteli

but I recall coming up with a way to use never to create a "pausable" stream by switchmapping between it and a "valued" stream.

Interesting! The never operator returns a Stream[Never] since v0.6.0, could you open a new issue with an example of such use if the Never type did not fix your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants