Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

traverse

import { traverse } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/datum.ts";

Traverse over a Datum using the supplied Applicable.

@example
import { traverse, replete } from "./datum.ts";
import * as O from "./option.ts";
import { pipe } from "./fn.ts";

const datum = pipe(
  replete(5),
  traverse(O.ApplicableOption)(n => O.some(n * 2))
);
console.log(datum); // Some({ tag: "Replete", value: 10 })
function traverse<V extends Kind>(A: Applicable<V>): <A, I, J, K, L, M>(favi: (a: A) => $<V, [I, J, K], [L], [M]>) => (ta: Datum<A>) => $<V, [Datum<I>, J, K], [L], [M]>;
§
traverse<V extends Kind>(A: Applicable<V>): <A, I, J, K, L, M>(favi: (a: A) => $<V, [I, J, K], [L], [M]>) => (ta: Datum<A>) => $<V, [Datum<I>, J, K], [L], [M]>
[src]

§Type Parameters

§
V extends Kind
[src]

§Parameters

§Return Type

§
<A, I, J, K, L, M>(favi: (a: A) => $<V, [I, J, K], [L], [M]>) => (ta: Datum<A>) => $<V, [Datum<I>, J, K], [L], [M]>
[src]