of

fun <T> of(element: T): NonEmptySet<T>

Returns a singleton set containing element. This behaves the same as Collections.singleton but returns a NonEmptySet for the extra type-safety.


fun <T> of(first: T, second: T, vararg rest: T): NonEmptySet<T>

Returns a non-empty set containing the given elements, minus duplicates, in the order each was specified.