Documentation Language: Swift

Function

asOrderedSet(_:)

Converts a collection to an ordered set.

func asOrderedSet(_ collection: any EcoreValue) throws -> [any EcoreValue]

Parameters

collection

The collection to convert

Return Value

A new array with duplicates removed in original order

Discussion

The asOrderedSet operation creates a new collection with duplicates removed whilst preserving the original order of first occurrence.