def push_where

bend-collections@1.0.0.0 · src/containers/bitlist.bend:129

import bend-collections@1.0.0.0/src/containers/bitlist.bend as Bitlist
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

129def push_where(inside: Bool, +lim: Maybe<&2, Nat>, +n: Nat, w: D.DynArray<&2, U32>, +v: Bool) -> Bitlist & Result<&2, &2, E.Error, Unit>:
130  match inside:
131    case True{}:
132      push_in(lim, n, w, v)
133    case False{}:
134      push_new(lim, n, D.push(U32, w, B.word_put(v, 0, 0n)))

Uses (14)

Used by (1)