BitTree.index_path: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/BitTree.bend as BitTree Lines 99-105 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=99&end_line=105 import Base # Handle index path in the packed bit-tree operations. def index_path(height: Nat, +index: Nat, acc: List<&2, Bool>) -> List<&2, Bool>: match height: case 0n: acc case 1n+h: index_path(h, Nat.div(index, 2n), Con{path_bit(Nat.mod(index, 2n)), acc}) Uses (6): 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=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/BitTree.bend&name=path_bit