def removed
import mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend as VisibleStatsimport Base
22# Removes one visible key, its key bytes, and its old value bytes.
23def removed(current: Stats, key_bytes: Nat, value_bytes: Nat) -> Decision:
24 match current:
25 case Stats{entries, payload_bytes}:
26 Applied{Stats{Nat.sub(entries, 1n),
27 Nat.sub(payload_bytes, Nat.add(key_bytes, value_bytes))}}