package tablecloth-base

  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.to_list = ["Bat"]
val from_array : string array -> t

Create a set from an Array.

Examples

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

Create a set from a List.

Examples

Set.String.from_list [|"a";"b";"g";"b";"g";"a";"a"|] |> Set.to_list = ["a";"b";"g"]
OCaml

Innovation. Community. Security.