array.toSet()

Convert an Array to a Set.

Signature

toSet() => Set<A>

Description

Converts the calling Array to a Set.

The calling Array isn’t changed.

Parameters

None

Return value

Type Description

Set<Generic>

Set representation of the Array instance.

Examples

[1, 2].toSet()
{
  data: [
    1,
    2
  ]
}

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!