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

getSortableOption

import { getSortableOption } from "https://raw.githubusercontent.com/baetheus/fun/main/option.ts";

Create an instance of Sortable<Option> given an instance of Sortable.

@example
import * as O from "./option.ts";
import * as N from "./number.ts";

const { sort } = O.getSortableOption(N.SortableNumber);

const result1 = sort(O.some(1), O.some(2)); // 1
const result2 = sort(O.some(1), O.some(1)); // 0
const result3 = sort(O.none, O.none); // 0
const result4 = sort(O.none, O.some(1)); // -1
function getSortableOption<A>({ sort }: Sortable<A>): Sortable<Option<A>>;
§
getSortableOption<A>({ sort }: Sortable<A>): Sortable<Option<A>>
[src]

§Type Parameters

§Parameters

§
{ sort }: Sortable<A>
[src]

§Return Type