package tablecloth-native

  1. Overview
  2. Docs

Construct sets of Strings

val empty : t

A set with nothing in it.

val singleton : string -> t

Create a set of a single String

Examples

Set.String.singleton "Bat" |> Set.toList = ["Bat"]
val fromArray : string array -> t

Create a set from an Array

Examples

Set.String.fromArray [|"a";"b";"g";"b";"g";"a";"a"|] |> Set.toArray = [|"a";"b";"g"|]
val from_array : string array -> t
val fromList : string list -> t

Create a set from a List

Examples

Set.String.fromList [|"a";"b";"g";"b";"g";"a";"a"|] |> Set.toList = ["a";"b";"g"]
val from_list : string list -> t