def rec.rle

cswap-bend-cli@0.1.0.0 · policy/rank.bend:50

import cswap-bend-cli@0.1.0.0/policy/rank.bend as Rank
import Base

50# x <= y.
51def rec.rle(+x: Maybe<&2, Nat>, +y: Maybe<&2, Nat>) -> Bool:
52  match x y:
53    case None{} None{}:
54      True{}
55    case None{} Some{b}:
56      False{}
57    case Some{a} None{}:
58      True{}
59    case Some{a} Some{b}:
60      Nat.is_le(a, b)

Uses (4)

Used by (1)