Algo.go.known: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/policy/algo.bend as Algo Lines 118-123 of cswap-bend-cli@0.1.0.0/policy/algo.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/policy/algo.bend&start_line=118&end_line=123 import Base import cswap-bend-cli@0.1.0.0/policy/types.bend as T import cswap-bend-cli@0.1.0.0/policy/decide.bend as D import cswap-bend-cli@0.1.0.0/policy/safe.bend as SF def go.known(+ah: Maybe<&2, Nat>, +algo: SF.Algo, +via: Via, +e: D.Env) -> T.Decision: match ah: case None{}: T.NoSwitch{T.ActiveUsageUnknown{}, "headroom unknown; a profile strategy never switches away from an account it cannot read (use 'cswap switch NUM')"} case Some{a}: go.below(via.auto(via) && Nat.is_lt(Nat.sub(T.full(), a), D.cfg.threshold(D.env.cfg(e))), algo, via, a, e) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/algo.bend&name=Via https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/algo.bend&name=go.below https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/algo.bend&name=via.auto https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/decide.bend&name=Env https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/decide.bend&name=cfg.threshold https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/decide.bend&name=env.cfg https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/safe.bend&name=Algo https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=Decision https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=Reason https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=full