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

fromCurriedSort

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

Create a Sortable from a curried Sort function.

@example
import { fromCurriedSort } from "./sortable.ts";

const numberSortable = fromCurriedSort<number>(
  (second) => (first) => first < second ? -1 : first > second ? 1 : 0
);
const result = numberSortable.sort(3, 5); // -1
function fromCurriedSort<A>(sort: (second: A) => (first: A) => Ordering): Sortable<A>;
§
fromCurriedSort<A>(sort: (second: A) => (first: A) => Ordering): Sortable<A>
[src]

§Type Parameters

§Parameters

§
sort: (second: A) => (first: A) => Ordering
[src]

§Return Type