def gt_land

cswap-bend-cli@0.1.0.0 · policy/bar.bend:33

import cswap-bend-cli@0.1.0.0/policy/bar.bend as Bar
import Base
import cswap-bend-cli@0.1.0.0/policy/types.bend as T

33# h > 100 - threshold: would the ranking accept it as a landing spot?
34def gt_land(+h: Maybe<&2, Nat>, +thr: Nat) -> Bool:
35  match h:
36    case None{}:
37      False{}
38    case Some{x}:
39      Nat.is_gt(x, Nat.sub(T.full(), thr))

Uses (6)

Used by (1)