function fnimport { fn } from "https://deno.land/x/ahh@v0.12.4/src/iterator.ts"; fn<T>(fn: Iterator<T>["next"]): FromFn<T>Creates an Iterator that calls fn each iteration. ExamplesExample 1 import { default as I } from "./iterator.ts"; let i = 0; const iter = I.fn(() => ++i); console.log(iter.next()); Type ParametersTParametersfn: Iterator<T>["next"]ReturnsFromFn<T>