Skip to main content
Module

x/fun/pair.ts>getSecond

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 getSecond
import { getSecond } from "https://deno.land/x/fun@v2.0.0-alpha.6/pair.ts";

Extracts the second value from a Pair.

Examples

Example 1

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

const shouldBe2 = pipe(
  P.pair(1, 2),
  P.getSecond
); // 2

Parameters

unnamed 0: Pair<A, B>