Skip to main content

Module TableclothComparator.Make

Create a new comparator by providing a module which satisifies T.

Examples​

module Book = struct
module T = struct
type t = {
isbn: string;
title: string;
}
let compare bookA bookB =
String.compare bookA.isbn bookB.isbn
end

include T
include Comparator.Make(T)
end

let books = Set.empty (module Book)

The output type of Make.

Parameters​

argument 1 M​

module M : T

Signature​

type identity​

type identity

val comparator​

val comparator : ( M.t, identity ) comparator