def act.cur
cswap-bend-cli@0.1.0.0 · usage/gate.bend:116
import cswap-bend-cli@0.1.0.0/usage/gate.bend as Gate
import Base
import cswap-bend-cli@0.1.0.0/clock.bend as Clock
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
116def act.cur(+m: Maybe<&2, String>, +path: String, +text: String, +snapshot: String) -> IO(Fs.Res(Gated)):
117 match m:
118 case None{}:
119 done.g(gated.err("transient", None{}))
120 case Some{+cur}:
121 IO.bind(U32, Fs.Res(Gated), Clock.now_s(), now => act.decide(adopt(cur, snapshot, now), path, text, cur))