def replace_word
import mylsm-lsm-store@0.3.2.0/src/BitTree.bend as BitTreeimport Base
171# Safe logical-word update. This helper makes metadata preservation and
172# unaffected-word laws direct to state.
173def replace_word(+tree: BitTree, +index: Nat, value: U32) -> BitTree:
174 replace_word_if(Nat.is_lt(index, word_count(tree)), tree, index, value)