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

first

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

A curried form of the pair constructor, starting with the first value of a pair.

@example
import * as P from "./pair.ts";
import { pipe } from "./fn.ts";

const result = pipe(
  37,
  P.first("Brandon"),
  P.mapSecond(n => n + 1),
); // ["Brandon", 38]
function first<A>(first: A): <B>(second: B) => Pair<A, B>;
§
first<A>(first: A): <B>(second: B) => Pair<A, B>
[src]

§Type Parameters

§Parameters

§
first: A
[src]

§Return Type

§
<B>(second: B) => Pair<A, B>
[src]