Bitlist.pop_bit: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/bitlist.bend as Bitlist Lines 160-166 of bend-collections@1.0.0.0/src/containers/bitlist.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/bitlist.bend&start_line=160&end_line=166 import Base import bend-collections@1.0.0.0/src/containers/bitset.bend as B import bend-collections@1.0.0.0/src/containers/dynamic_array.bend as D import bend-collections@1.0.0.0/src/containers/types/bitlist.bend as E # The last bit b of word x: a set bit is cleared so the tail stays zero. def pop_bit(+lim: Maybe<&2, Nat>, +m: Nat, w: D.DynArray<&2, U32>, +x: U32, +b: Bool) -> Bitlist & Result<&2, &2, E.Error, Bool>: match b: case False{}: (BL{lim, m, w}, Done{False{}}) case True{}: pop_set(lim, m, D.set(U32, w, B.wordix(m), B.word_put(False{}, x, B.bitix(m)))) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/bitlist.bend&name=Bitlist https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/bitlist.bend&name=pop_set https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/bitset.bend&name=bitix https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/bitset.bend&name=word_put https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/bitset.bend&name=wordix https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/dynamic_array.bend&name=DynArray https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/dynamic_array.bend&name=set https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/types/bitlist.bend&name=Error