method I.foldimport { I } from "https://deno.land/x/ahh@v0.10.3/src/iter/mod.ts"; fold<T, U>(iter: Iterator<T>,init: U,f: (_: U, _1: T) => U,): UConsumes an Iterator and calls f on each item to fold it into init. ExamplesExample 1 import { I } from "./mod.ts"; const iter = I.iter([1, 2, 3]); console.log(I.fold(iter, 0, (a, b) => a + b)); // 6 console.log(iter.next()); // undefined Type ParametersTUParametersiter: Iterator<T>init: Uf: (_: U, _1: T) => UReturnsU