Skip to main content

Module TableclothSet.String

Construct sets of Strings

type t​

type nonrec t = Of(TableclothString).t

val empty​

val empty : t

A set with nothing in it.

val singleton​

val singleton : string -> t

Create a set of a single String

Examples

Set.String.singleton "Bat" |> Set.toList = ["Bat"]

val fromArray​

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​

val from_array : string array -> t

val fromList​

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​

val from_list : string list -> t