BitTree.tree_set_word: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/BitTree.bend as BitTree Lines 125-141 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=125&end_line=141 import Base # Handle tree set word in the packed bit-tree operations. def tree_set_word(path: List<&2, Bool>, value: U32, tree: WordTree) -> WordTree: match path tree: case Nil{} Empty{}: Empty{} case Nil{} Leaf{word}: Leaf{value} case Nil{} Fork{left, right}: Fork{left, right} case Con{side, rest} Empty{}: Empty{} case Con{side, rest} Leaf{word}: Leaf{word} case Con{False{}, rest} Fork{left, right}: Fork{tree_set_word(rest, value, left), right} case Con{True{}, rest} Fork{left, right}: Fork{left, tree_set_word(rest, value, right)} Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/BitTree.bend&name=WordTree