def is_strict

mylsm-lsm-store@0.6.0.1 · src/SortedRun.bend:66

import mylsm-lsm-store@0.6.0.1/src/SortedRun.bend as SortedRun
import Base
import mylsm-lsm-store@0.6.0.1/src/Keys.bend as Keys
import mylsm-lsm-store@0.6.0.1/src/MemTable.bend as MemTable

66# Check whether strict holds for the sorted-run operations.
67def is_strict(entries: List<&2, MemTable.Entry>) -> Bool:
68  match entries:
69    case Nil{}:
70      True{}
71    case Con{h, Nil{}}:
72      True{}
73    case Con{+h, Con{+next, +rest}}:
74      bool_and(Keys.cmp_is_lt(entry_cmp(h, next)), is_strict(Con{next, rest}))

Uses (6)

Used by (1)