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

Support multiple bindings in :bg-watcher #285

Open
cgrand opened this issue Nov 15, 2023 · 0 comments
Open

Support multiple bindings in :bg-watcher #285

cgrand opened this issue Nov 15, 2023 · 0 comments

Comments

@cgrand
Copy link
Contributor

cgrand commented Nov 15, 2023

Currently :bg-watcher only allows for one binding: it can only listen to one stream/etc. This creates the need for utilities (like switchmap) to compose a single stream so as to consume it with :bg-watcher.

Here I propose allowing multiple bindings in :bg-watcher

[a-binding a-expr
 b-binding b-expr]

the semantics are that each time we get new values from a, we unsubscribe and resubscribe to b-expr. This would be similar to switchmap. In fact we would need a composite ISubscribable for that.

Additionally I believe it would be beneficial to allow :let [...] after binding pairs (and their options).

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

1 participant