def set_checked

bend-collections@1.0.0.0 · src/containers/dlist_iterator.bend:186

import bend-collections@1.0.0.0/src/containers/dlist_iterator.bend as DlistIterator
import Base

186def set_checked(~T: Data, it: Iterator<T>, x: T, empty: Bool) -> Iterator<T> & Result<&2, &2, Error, Unit>:
187  match it empty:
188    case IT{s, n, last, f, i} True{}:
189      (IT{s, n, 0, f, i}, Fail{NoCurrent{}})
190    case IT{s, n, +h, f, i} False{}:
191      set_result(~T, n, h, f, i, cursor_set(~T, s, h, x))

Uses (9)

Used by (1)