Gate.cas.pick: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/usage/gate.bend as Gate Lines 86-93 of cswap-bend-cli@0.1.0.0/usage/gate.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/usage/gate.bend&start_line=86&end_line=93 import Base import cswap-bend-cli@0.1.0.0/fs.bend as Fs import cswap-bend-cli@0.1.0.0/json.bend as Json # CAS on the lineage: write the successor only when the store still holds the # generation we consumed; a moved store keeps its newer lineage. def cas.pick(+same: Bool, +path: String, +text: String, +new: String, +acct: Json.Json, +now_cred: String) -> IO(Fs.Res(Gated)): match same: case True{}: write.back(path, text, new, acct) case False{}: done.g(gated.ok(now_cred, Some{now_cred})) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs.bend&name=Res https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/gate.bend&name=Gated https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/gate.bend&name=done.g https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/gate.bend&name=gated.ok https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/gate.bend&name=write.back