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

map

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

Map over the right return value of a FnEither.

@example
import * as FE from "./fn_either.ts";
import { pipe } from "./fn.ts";

const result = pipe(
  FE.id<number>(),
  FE.map(n => n + 1),
)(0); // Right(1)
function map<A, I>(fai: (a: A) => I): <B = never, D = unknown>(ua: FnEither<D, B, A>) => FnEither<D, B, I>;
§
map<A, I>(fai: (a: A) => I): <B = never, D = unknown>(ua: FnEither<D, B, A>) => FnEither<D, B, I>
[src]

§Type Parameters

§Parameters

§
fai: (a: A) => I
[src]

§Return Type

§
<B = never, D = unknown>(ua: FnEither<D, B, A>) => FnEither<D, B, I>
[src]