def hit_of
bendtorch-core@0.1.0.0 · src/storage/api.bend:404
import bendtorch-core@0.1.0.0/src/storage/api.bend as Api
import Base
import bendtorch-core@0.1.0.0/src/storage/LAWS.bend as Laws
404def hit_of(+n: Nat, +ops: List<&2, Laws.Op>) -> Bool:
405 match ops:
406 case Nil{}:
407 True{}
408 case +op <> +later:
409 match op:
410 case Laws.Write{+i, w}:
411 Nat.is_lt(U32.to_nat(i), n)
412 case Laws.Read{+i}:
413 Nat.is_lt(U32.to_nat(i), n)
414 case Laws.First{}:
415 True{}
416 case Laws.Second{}:
417 True{}
418 case Laws.Length{}:
419 True{}