ClojureDart
ClojureDart copied to clipboard
Support multiple bindings in `:bg-watcher`
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).