def push_if
bend-collections@1.0.0.0 · src/containers/bitlist.bend:140
import bend-collections@1.0.0.0/src/containers/bitlist.bend as Bitlist
import Base
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
140def push_if(ok: Bool, +lim: Maybe<&2, Nat>, +n: Nat, w: D.DynArray<&2, U32>, +v: Bool) -> Bitlist & Result<&2, &2, E.Error, Unit>:
141 match ok:
142 case True{}:
143 push_room(lim, n, v, D.length(U32, w))
144 case False{}:
145 (BL{lim, n, w}, Fail{E.Full{}})