Skip to main content
Module

x/fun/pair.ts>getFirst

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function getFirst
import { getFirst } from "https://deno.land/x/fun@v2.0.0-alpha.12/pair.ts";

Extracts the first value from a Pair.

Examples

Example 1

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

const shouldBe1 = pipe(
  P.pair(1, 2),
  P.getFirst
); // 1

Parameters

unnamed 0: Pair<A, B>