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/sync.ts";

Traverse over a Sync using the supplied Applicable.

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

const syncValue = wrap(5);
const faui = (n: number) => O.some(n * 2);
const traverseOption = traverse(O.ApplicableOption)(faui);

const result = traverseOption(syncValue); // Some(Sync(10))
function traverse<V extends Kind>(A: Applicable<V> & Mappable<V>): <A, I, J, K, L, M>(faui: (a: A) => $<V, [I, J, K], [L], [M]>) => (ta: Sync<A>) => $<V, [Sync<I>, J, K], [L], [M]>;
§
traverse<V extends Kind>(A: Applicable<V> & Mappable<V>): <A, I, J, K, L, M>(faui: (a: A) => $<V, [I, J, K], [L], [M]>) => (ta: Sync<A>) => $<V, [Sync<I>, J, K], [L], [M]>
[src]

§Type Parameters

§
V extends Kind
[src]

§Parameters

§Return Type

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