Skip to main content
Module

x/ahh/mod.ts>I

Idiomatic type-safety structures for TypeScript.
Go to Latest
variable I
import { I } from "https://deno.land/x/ahh@v0.9.0/mod.ts";

Functionality for Iterator.

type

{ fn: <T>(f: Iterator<T>["next"]) => Iterator<T>; iter: <T>(iter: Iterable<T>) => Iterator<T>; empty: <T>() => Iterator<T>; once: <T>(item: T) => Iterator<T>; repeat: <T>(item: T) => Iterator<T>; successors: <T>(first: Option<T>, f: (_: T) => Option<T>) => unknown; zip: <T, U>(iterA: Iterator<T>, iterB: Iterator<U>) => Iterator<[T, U]>; chain: <T>(iterA: Iterator<T>, iterB: Iterator<T>) => Iterator<T>; map: <T, U>(iter: Iterator<T>, f: (_: T) => U) => Iterator<U>; enumerate: <T>(iter: Iterator<T>) => Iterator<[number, T]>; skip: <T>(iter: Iterator<T>, n: number) => Iterator<T>; skipWhile: <T>(iter: Iterator<T>, f: (_: T) => boolean) => Iterator<T>; take: <T>(iter: Iterator<T>, n: number) => Iterator<T>; takeWhile: <T>(iter: Iterator<T>, f: (_: T) => boolean) => unknown; peekable: <T>(iter: Iterator<T>) => Peekable<T>; forEach: <T>(iter: Iterator<T>, f: (_: T) => void) => void; fold: <T, U>(
iter: Iterator<T>,
init: U,
f: (_: U, _1: T) => U,
) => U; count: <T>(iter: Iterator<T>) => number; last: <T>(iter: Iterator<T>) => Option<T>; nth: <T>(iter: Iterator<T>, n: number) => Option<T>; find: <T>(iter: Iterator<T>, f: (_: T) => boolean) => Option<T>; filter: <T>(iter: Iterator<T>, f: (_: T) => boolean) => Iterator<T>; flatten: <T>(iter: Iterator<Iterator<T>>) => Iterator<T>; }