def meas.step
import cswap-bend-cli@0.1.0.0/policy/rank.bend as Rankimport Base
193def meas.step(+m: Meas, +h: Maybe<&2, Nat>, +thr: Nat) -> Meas:
194 match m:
195 case Meas{any, all, best}:
196 match h:
197 case None{}:
198 m
199 case Some{x}:
200 Meas{True{}, all && above.thr(x, thr), Nat.max(best, x)}