def step_eq

bend-schema-lib@0.4.1.0 · core.bend:1040

import bend-schema-lib@0.4.1.0/core.bend as Core
import Base

1040def step_eq(x: Step, y: Step) -> Bool:
1041  match x y:
1042    case AtIndex{i} AtIndex{j}:
1043      Nat.is_eq(i, j)
1044    case AtField{a, n} AtField{b, m}:
1045      Bool.and(Nat.is_eq(a, b), String.eq(n, m))
1046    case BoundAt{i, k} BoundAt{j, m}:
1047      Bool.and(Nat.is_eq(i, j), String.eq(k, m))
1048    case AtKey{k} AtKey{m}:
1049      String.eq(k, m)
1050    case _ _:
1051      False{}

Uses (5)

Used by (1)