generateSetFrom

fun generateSetFrom(size: Int, generator: (Int) -> A_BasicObject): A_Set

Create an A_Set, then run the generator the specified number of times to produce elements to add. Deduplicate the elements. Answer the resulting set.

Return

The new set.

Parameters

size

The number of values to extract from the generator.

generator

A generator to provide AvailObjects to store.


Create an A_Set, then run the iterator the specified number of times to produce elements to add. Deduplicate the elements. Answer the resulting set.

Return

The new set.

Parameters

size

The number of values to extract from the iterator.

iterator

An iterator to provide AvailObjects to store.


fun <A> generateSetFrom(size: Int, iterator: Iterator<A>, transformer: (A) -> A_BasicObject): A_Set

Create an A_Set, then run the iterator the specified number of times to produce elements to add. Deduplicate the elements. Answer the resulting set.

Return

The new set.

Parameters

A

The type of value produced by the iterator and consumed by the transformer.

size

The number of values to extract from the iterator.

iterator

An iterator to provide AvailObjects to store.

transformer

A function to transform iterator elements.


fun <A> generateSetFrom(collection: Collection<A>, transformer: (A) -> A_BasicObject): A_Set

Create an A_Set, then iterate over the collection, invoking the transformer to produce elements to add. Deduplicate the elements. Answer the resulting set.

Return

The new set.

Parameters

A

The type of value found in the collection and consumed by the transformer.

collection

A collection containing values to be transformed.

transformer

A function to transform collection elements to A_BasicObjects.


fun <A> generateSetFrom(array: Array<A>, transformer: (A) -> A_BasicObject): A_Set

Create an A_Set, then iterate over the array, invoking the transformer to produce elements to add. Deduplicate the elements. Answer the resulting set.

Return

The new set.

Parameters

A

The type of value found in the array and consumed by the transformer.

array

An array containing values to be transformed.

transformer

A function to transform array elements to A_BasicObjects.


fun generateSetFrom(tuple: A_Tuple, transformer: (AvailObject) -> A_BasicObject): A_Set

Create an A_Set, then iterate over the A_Tuple, invoking the transformer to produce elements to add. Deduplicate the elements. Answer the resulting set.

Return

The new set.

Parameters

tuple

A tuple containing values to be transformed.

transformer

A function to transform tuple elements to A_BasicObjects.