def set_fin
bend-collections@1.0.0.0 · src/containers/internal/dlist_storage.bend:238
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
238def set_fin(~T: Data, +tag: U32, +fresh: U32, +free: U32, +count: Nat, +head: U32, +tail: U32, +depth: Nat, +cap: U32, prevs: Array<U32>, nexts: Array<U32>, +i: U32, x: T, r: Array<Maybe<&2, T>> & Maybe<&2, T>) -> DList<T> & Result<&2, &2, E.Error, Unit>:
239 (vals, m) = r
240 match m:
241 case None{}:
242 (DL{tag, fresh, free, count, head, tail, depth, cap, Array.set(Maybe<&2, T>, vals, i, None{}), prevs, nexts}, Fail{E.StaleHandle{}})
243 case Some{v}:
244 (DL{tag, fresh, free, count, head, tail, depth, cap, vals, prevs, nexts}, Done{Unit{}})