Skip to main content

Module TableclothSet.Int

Construct sets of Ints

type t​

type nonrec t = Of(TableclothInt).t

val empty​

val empty : t

A set with nothing in it.

val singleton​

val singleton : int -> t

Create a set from a single Int

Examples

Set.Int.singleton 5 |> Set.toList = [5]

val fromArray​

val fromArray : int array -> t

Create a set from an Array

Examples

Set.Int.fromArray [|1;2;3;3;2;1;7|] |> Set.toArray = [|1;2;3;7|]

val from_array​

val from_array : int array -> t

val fromList​

val fromList : int list -> t

Create a set from a List

Examples

Set.Int.fromList [1;2;3;3;2;1;7] |> Set.toList = [1;2;3;7]

val from_list​

val from_list : int list -> t