Safe.key1: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/policy/safe.bend as Safe Lines 76-87 of cswap-bend-cli@0.1.0.0/policy/safe.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/policy/safe.bend&start_line=76&end_line=87 import Base # round-robin: the next slot after the live one, wrapping to the lowest. # soonest-reset: the weekly window that resets first (unknown last), then more # headroom. drain-first: the least headroom (the most used). best, sticky: the # most headroom. Ties go to the first account in sequence order. def key1(+algo: Algo, +active: Nat, +slot: Nat, +reset: Maybe<&2, Nat>) -> Maybe<&2, Nat>: match algo: case ARoundRobin{}: Some{rr.group(slot, active)} case ASoonestReset{}: reset case o: Some{0n} Uses (4): 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=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/safe.bend&name=rr.group