def latest

bendtorch-core@0.1.0.0 · src/storage/LAWS.bend:142

import bendtorch-core@0.1.0.0/src/storage/LAWS.bend as LAWS
import Base

142def latest(+n: Nat, op: Op, +j: U32, value: F32) -> F32:
143  match op:
144    case Write{+i, new}:
145      Bool.pick(F32, Bool.and(Nat.is_lt(U32.to_nat(i), n), Nat.is_eq(U32.to_nat(i), U32.to_nat(j))), new, value)
146    case Read{i}:
147      value
148    case First{}:
149      value
150    case Second{}:
151      value
152    case Length{}:
153      value

Uses (9)

Used by (19)