def moves.eq

ezx@1.11.0.0 · src/ws/moved.bend:241

import ezx@1.11.0.0/src/ws/moved.bend as Moved
import Base

241# whether two lists of moves are one
242def moves.eq(aa: List<&2, Shift>, bb: List<&2, Shift>) -> Bool:
243  match aa bb:
244    case Nil{} Nil{}:
245      True{}
246    case Nil{} Con{_b, _bt}:
247      False{}
248    case Con{_a, _at} Nil{}:
249      False{}
250    case Con{a, at} Con{b, bt}:
251      rest = moves.eq(at, bt)
252      Bool.and(move.eq(a, b), rest)

Uses (5)

Used by (1)