def collect
cswap-bend-cli@0.1.0.0 · collectrun.bend:203
import cswap-bend-cli@0.1.0.0/collectrun.bend as Collectrun
import Base
import cswap-bend-cli@0.1.0.0/store/base.bend as SBase
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/ustore.bend as Ustore
import cswap-bend-cli@0.1.0.0/view.bend as View
import cswap-bend-cli@0.1.0.0/collect.bend as Collect
203
204
205def collect(+ctx: SBase.Ctx, +xs: List<&2, Collect.Info>, +now: U32, +models: List<&2, String>, +threshold: U32, +tick: Nat) -> Act.of(List<&2, View.Acct>):
206 Act.bind(Json.Json, List<&2, View.Acct>, Ustore.read_act(SBase.root_of(ctx)),
207 rows => Act.bind(List<&2, Collect.St>, List<&2, View.Acct>, Act.lift(List<&2, Collect.St>, Collect.states(xs, rows, now)),
208 ss => pass.heal(SBase.root_of(ctx), ss, models, threshold, now, tick, xs)))