/** * Traversable is a structure that encapsulates the idea of iterating through * data and collecting it into another structure. This can be as simple as * turning an Array> into Option> or as complicated * as creating all combinations of numbers in three Array. * * @module Traversable * @since 2.0.0 */ import type { $, Hold, Kind } from "./kind.ts"; import type { Applicable } from "./applicable.ts"; import type { Mappable } from "./mappable.ts"; import type { Foldable } from "./foldable.ts"; /** * A Traversable structure extends Mappable and Foldable. It contains the * methods map, fold, and traverse. * * @since 2.0.0 */ export interface Traversable extends Mappable, Foldable, Hold { readonly traverse: ( A: Applicable, ) => ( faui: (a: A) => $, ) => ( ta: $, ) => $, J, K], [L], [M]>; }