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

getFirst

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

Extracts the first value from a Pair.

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

const shouldBe1 = pipe(
  P.pair(1, 2),
  P.getFirst
); // 1
function getFirst<A, B>([first]: Pair<A, B>): A;
§
getFirst<A, B>([first]: Pair<A, B>): A
[src]

§Type Parameters

§Parameters

§
[first]: Pair<A, B>
[src]

§Return Type