Decide.decide: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/policy/decide.bend as Decide Lines 430-435 of cswap-bend-cli@0.1.0.0/policy/decide.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/policy/decide.bend&start_line=430&end_line=435 import Base import cswap-bend-cli@0.1.0.0/policy/types.bend as T import cswap-bend-cli@0.1.0.0/policy/usage.bend as U # One autoswitch tick. `st` is autoswitch_state.json (last switch, where it # came from, what that account looked like), `mem` the engine's counters # (see `mem_after` for the next ones). Pure: the caller fetches usage, # applies the decision and records the switch. def decide(+active: Nat, +accounts: List<&2, T.Account>, +usage: List<&2, T.Usage>, +now: Nat, +cfg: T.Config, +st: T.State, +mem: T.Mem) -> T.Decision: decide.acct(U.account.of(active, accounts), Env{active, accounts, usage, now, cfg, st, mem}) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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=decide.acct https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=Account https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=Config 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=Mem https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=State https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=Usage https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/usage.bend&name=account.of