def index_path

mylsm-lsm-store@0.6.0.1 · src/BitTree.bend:99

import mylsm-lsm-store@0.6.0.1/src/BitTree.bend as BitTree
import Base

99# Handle index path in the packed bit-tree operations.
100def index_path(height: Nat, +index: Nat, acc: List<&2, Bool>) -> List<&2, Bool>:
101  match height:
102    case 0n:
103      acc
104    case 1n+h:
105      index_path(h, Nat.div(index, 2n), Con{path_bit(Nat.mod(index, 2n)), acc})

Uses (6)

Used by (2)