amber/web/iterator

Types

pub type Iterator(a, return, next)

Functions

pub fn new(
  next: fn(Option(a)) -> IteratorResult(b, c),
) -> Iterator(b, c, a)
pub fn next(iterator: Iterator(a, b, c)) -> IteratorResult(a, b)
pub fn next_with(
  iterator: Iterator(a, b, c),
  value: c,
) -> IteratorResult(a, b)
pub fn return(
  iterator: Iterator(a, b, c),
) -> Result(IteratorResult(a, b), Nil)
pub fn return_with(
  iterator: Iterator(a, b, c),
  value: b,
) -> Result(IteratorResult(a, b), Nil)
pub fn throw(
  iterator: Iterator(a, b, c),
  e: d,
) -> Result(IteratorResult(a, b), Nil)
pub fn with_return(
  iterator: Iterator(a, b, c),
  return: fn(Option(b)) -> IteratorResult(a, b),
) -> Iterator(a, b, c)
pub fn with_throw(
  iterator: Iterator(a, b, c),
  throw: fn(d) -> IteratorResult(a, b),
) -> Iterator(a, b, c)
Search Document