def replace_word_if

mylsm-lsm-store@0.3.2.0 · src/BitTree.bend:162

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

162def replace_word_if(inside: Bool, tree: BitTree, index: Nat, value: U32) -> BitTree:
163  match inside:
164    case False{}:
165      tree
166    case True{}:
167      match tree:
168        case BT{root, words, capacity, +height}:
169          BT{tree_set_word(index_path(height, index, Nil{}), value, root), words, capacity, height}

Uses (7)

Used by (1)