def remove_checked
bend-collections@1.0.0.0 · src/containers/internal/dlist_storage.bend:197
import bend-collections@1.0.0.0/src/containers/internal/dlist_storage.bend as DlistStorage
import Base
import bend-collections@1.0.0.0/src/containers/types/internal_dlist.bend as E
197def remove_checked(~T: Data, ok: Bool, +tag: U32, +fresh: U32, +free: U32, +count: Nat, +head: U32, +tail: U32, +depth: Nat, +cap: U32, vals: Array<Maybe<&2, T>>, prevs: Array<U32>, nexts: Array<U32>, +i: U32, same: Bool) -> DList<T> & Result<&2, &2, E.Error, T>:
198 match ok same:
199 case _ False{}:
200 (DL{tag, fresh, free, count, head, tail, depth, cap, vals, prevs, nexts}, Fail{E.ForeignHandle{}})
201 case False{} True{}:
202 (DL{tag, fresh, free, count, head, tail, depth, cap, vals, prevs, nexts}, Fail{E.StaleHandle{}})
203 case True{} True{}:
204 rm_found(~T, tag, fresh, free, count, head, tail, depth, cap, prevs, nexts, i, Array.get(Maybe<&2, T>, vals, i))