Skip to main content
Module

x/fun/mod.ts>optics.traverse

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function optics.traverse
import { optics } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { traverse } = optics;

Traverse a U using a Traversable for U. By construction get for a Fold will return an array of values.

Type Parameters

T extends Kind

Parameters

T: Traversable<T>

Returns

<U extends Tag, S, A, B, C, D, E>(first: Optic<U, S, $<T, [A, B, C], [D], [E]>>) => Optic<Align<U, FoldTag>, S, A>