BitTree.well_formed: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/BitTree.bend as BitTree Lines 254-261 of mylsm-lsm-store@0.6.0.1/src/BitTree.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/BitTree.bend&start_line=254&end_line=261 import Base # Checks zero canonicality, logical bounds, power-of-two capacity, height, and # exact tree shape. It does not require padding words to remain zero. def well_formed(tree: BitTree) -> Bool: match tree: case BT{Empty{}, words, capacity, height}: empty_metadata_ok(words, capacity, height) case BT{root, words, capacity, height}: nonempty_metadata_ok(root, words, capacity, height) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/BitTree.bend&name=BitTree https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/BitTree.bend&name=WordTree https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/BitTree.bend&name=empty_metadata_ok https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/BitTree.bend&name=nonempty_metadata_ok