package tablecloth-base

  1. Overview
  2. Docs

Module Set.IntSource

Construct sets of Ints

Sourceval empty : t

A set with nothing in it.

Sourceval singleton : int -> t

Create a set from a single Int

Examples

Set.Int.singleton 5 |> Set.to_list = [5]
Sourceval from_array : int array -> t

Create a set from an Array

Examples

Set.Int.from_array [|1;2;3;3;2;1;7|] |> Set.to_array = [|1;2;3;7|]
Sourceval from_list : int list -> t

Create a set from a List

Examples

Set.Int.from_list [1;2;3;3;2;1;7] |> Set.to_list = [1;2;3;7]