Is there an arity of m/latest that takes a coll of N signals so I can wait on all the signals I defined before? I.e. instead of
(m/signal (m/latest vector (m/signal (m/all vector [m/reduce over a coll of signals?
I can do (apply m/latest vector signals) but that still builds up a long arg list, and I'm not sure how long that list can be.
I see the underlying implementation of m/latest is Latest/run, which takes a coll of signals (`fs`).
There is nothing wrong with (apply m/latest ,,,) on a large collection of inputs, the only limitation is the system memory
m/latest doesn't like second arg being empty. What to use instead of m/latest if a flow has no dependencies?
(m/cp (f))
awesome
Given a flow that ends in (m/reduce (fn [acc v] v) nil <signal-thingy), is there a way to get at v without sending printing or sending a message in the reducing function, or setting an atom? I guess because it's a continuous flow that makes no sense, right?
Well, the purpose of m/reduce is to take a complete stream of values and reduce it to a single value. If you want to do something else, m/reduce might not be the best choice.
What do you want to do with v? m/cp can consume a continuous flow and produce a continuous flow, giving you access to the values, so you could pass your signal as input to the m/cp and pass the output of the m/cp to the reduce. m/signal could also be used to let you have multiple subscribers to the signal, so that you could have one subscriber running the reduce while another subscriber independently did something else with the values. But it depends on what you want to do.