Header menu logo FSharp.Core.Fluent

SeqExtensionsConstrained Type

Static members

Static member Description

SeqExtensionsConstrained.allPairs (source, source2)

Full Usage: SeqExtensionsConstrained.allPairs (source, source2)

Parameters:
    source : 'T seq
    source2 : 'U seq - The second input sequence.

Returns: ('T * 'U) seq The resulting sequence of pairs.
Modifiers: inline
Type parameters: 'T, 'U

Returns a new sequence that contains all pairings of elements from the first and second sequences.

source : 'T seq
source2 : 'U seq

The second input sequence.

Returns: ('T * 'U) seq

The resulting sequence of pairs.

ArgumentException Thrown when either of the input sequences is null.

SeqExtensionsConstrained.average source

Full Usage: SeqExtensionsConstrained.average source

Parameters:
    source : ^T seq - The input sequence.

Returns: ^T The average.
Modifiers: inline
Type parameters: ^T

Returns the average of the elements in the sequence.

The elements are averaged using the + operator, DivideByInt method and Zero property associated with the element type.

source : ^T seq

The input sequence.

Returns: ^T

The average.

ArgumentNullException Thrown when the input sequence is null.
ArgumentException Thrown when the input sequence has zero elements.

SeqExtensionsConstrained.averageBy (source, projection)

Full Usage: SeqExtensionsConstrained.averageBy (source, projection)

Parameters:
    source : 'T seq - The input sequence.
    projection : 'T -> ^U - A function applied to transform each element of the sequence.

Returns: ^U The average.
Modifiers: inline
Type parameters: 'T, ^U

Returns the average of the results generated by applying the function to each element of the sequence.

The elements are averaged using the + operator, DivideByInt method and Zero property associated with the generated type.

source : 'T seq

The input sequence.

projection : 'T -> ^U

A function applied to transform each element of the sequence.

Returns: ^U

The average.

ArgumentNullException Thrown when the input sequence is null.
ArgumentException Thrown when the input sequence has zero elements.

SeqExtensionsConstrained.contains (source, value)

Full Usage: SeqExtensionsConstrained.contains (source, value)

Parameters:
    source : 'T seq - The input sequence.
    value : 'T - The value to locate in the input sequence.

Returns: bool True if the input sequence contains the specified element; false otherwise.
Modifiers: inline
Type parameters: 'T

Tests if the sequence contains the specified element.

source : 'T seq

The input sequence.

value : 'T

The value to locate in the input sequence.

Returns: bool

True if the input sequence contains the specified element; false otherwise.

ArgumentNullException Thrown when the input sequence is null.

SeqExtensionsConstrained.distinct source

Full Usage: SeqExtensionsConstrained.distinct source

Parameters:
    source : 'T seq - The input sequence.

Returns: 'T seq The result sequence.
Modifiers: inline
Type parameters: 'T

Returns a sequence that contains no duplicate entries according to generic hash and equality comparisons on the entries. If an element occurs multiple times in the sequence then the later occurrences are discarded.

source : 'T seq

The input sequence.

Returns: 'T seq

The result sequence.

ArgumentNullException Thrown when the input sequence is null.

SeqExtensionsConstrained.except (source, itemsToExclude)

Full Usage: SeqExtensionsConstrained.except (source, itemsToExclude)

Parameters:
    source : 'T seq - A sequence whose elements that are not also in first will be returned.
    itemsToExclude : 'T seq - A sequence whose elements that also occur in the second sequence will cause those elements to be removed from the returned sequence.

Returns: 'T seq A sequence that contains the set difference of the elements of two sequences.
Modifiers: inline
Type parameters: 'T

Returns a new sequence with the distinct elements of the second sequence which do not apear in the first sequence, using generic hash and equality comparisons to compare values.

Note that this function returns a sequence that digests the whole of the first input sequence as soon as the result sequence is iterated. As a result this function should not be used with large or infinite sequences in the first parameter. The function makes no assumption on the ordering of the first input sequence.

source : 'T seq

A sequence whose elements that are not also in first will be returned.

itemsToExclude : 'T seq

A sequence whose elements that also occur in the second sequence will cause those elements to be removed from the returned sequence.

Returns: 'T seq

A sequence that contains the set difference of the elements of two sequences.

ArgumentNullException Thrown when either of the two input sequences is null.

SeqExtensionsConstrained.insertAt (source, index, value)

Full Usage: SeqExtensionsConstrained.insertAt (source, index, value)

Parameters:
    source : 'T seq
    index : int - The index where the item should be inserted.
    value : 'T - The value to insert.

Returns: 'T seq The result sequence.
Modifiers: inline
Type parameters: 'T

Return a new sequence with a new item inserted before the given index.

source : 'T seq
index : int

The index where the item should be inserted.

value : 'T

The value to insert.

Returns: 'T seq

The result sequence.

ArgumentException Thrown when index is below 0 or greater than source.Length.

SeqExtensionsConstrained.insertManyAt (source, index, values)

Full Usage: SeqExtensionsConstrained.insertManyAt (source, index, values)

Parameters:
    source : 'T seq
    index : int - The index where the items should be inserted.
    values : 'T seq - The values to insert.

Returns: 'T seq The result sequence.
Modifiers: inline
Type parameters: 'T

Return a new sequence with new items inserted before the given index.

source : 'T seq
index : int

The index where the items should be inserted.

values : 'T seq

The values to insert.

Returns: 'T seq

The result sequence.

ArgumentException Thrown when index is below 0 or greater than source.Length.

SeqExtensionsConstrained.max source

Full Usage: SeqExtensionsConstrained.max source

Parameters:
    source : 'T seq - The input sequence.

Returns: 'T The largest element of the sequence.
Modifiers: inline
Type parameters: 'T

Returns the greatest of all elements of the sequence, compared via Operators.max

source : 'T seq

The input sequence.

Returns: 'T

The largest element of the sequence.

ArgumentNullException Thrown when the input sequence is null.
ArgumentException Thrown when the input sequence is empty.

SeqExtensionsConstrained.maxBy (source, projection)

Full Usage: SeqExtensionsConstrained.maxBy (source, projection)

Parameters:
    source : 'T seq - The input sequence.
    projection : 'T -> 'U - A function to transform items from the input sequence into comparable keys.

Returns: 'T The largest element of the sequence.
Modifiers: inline
Type parameters: 'T, 'U

Returns the greatest of all elements of the sequence, compared via Operators.max on the function result.

source : 'T seq

The input sequence.

projection : 'T -> 'U

A function to transform items from the input sequence into comparable keys.

Returns: 'T

The largest element of the sequence.

ArgumentNullException Thrown when the input sequence is null.
ArgumentException Thrown when the input sequence is empty.

SeqExtensionsConstrained.min source

Full Usage: SeqExtensionsConstrained.min source

Parameters:
    source : 'T seq - The input sequence.

Returns: 'T The smallest element of the sequence.
Modifiers: inline
Type parameters: 'T

Returns the lowest of all elements of the sequence, compared via Operators.min.

source : 'T seq

The input sequence.

Returns: 'T

The smallest element of the sequence.

ArgumentNullException Thrown when the input sequence is null.
ArgumentException Thrown when the input sequence is empty.

SeqExtensionsConstrained.minBy (source, projection)

Full Usage: SeqExtensionsConstrained.minBy (source, projection)

Parameters:
    source : 'T seq - The input sequence.
    projection : 'T -> 'U - A function to transform items from the input sequence into comparable keys.

Returns: 'T The smallest element of the sequence.
Modifiers: inline
Type parameters: 'T, 'U

Returns the lowest of all elements of the sequence, compared via Operators.min on the function result.

source : 'T seq

The input sequence.

projection : 'T -> 'U

A function to transform items from the input sequence into comparable keys.

Returns: 'T

The smallest element of the sequence.

ArgumentNullException Thrown when the input sequence is null.
ArgumentException Thrown when the input sequence is empty.

SeqExtensionsConstrained.removeAt (source, index)

Full Usage: SeqExtensionsConstrained.removeAt (source, index)

Parameters:
    source : 'T seq
    index : int - The index of the item to be removed.

Returns: 'T seq The result sequence.
Modifiers: inline
Type parameters: 'T

Return a new sequence with the item at a given index removed.

source : 'T seq
index : int

The index of the item to be removed.

Returns: 'T seq

The result sequence.

ArgumentException Thrown when index is outside 0..source.Length - 1

SeqExtensionsConstrained.removeManyAt (source, index, count)

Full Usage: SeqExtensionsConstrained.removeManyAt (source, index, count)

Parameters:
    source : 'T seq
    index : int - The index of the item to be removed.
    count : int - The number of items to remove.

Returns: 'T seq The result sequence.
Modifiers: inline
Type parameters: 'T

Return a new sequence with the number of items starting at a given index removed.

source : 'T seq
index : int

The index of the item to be removed.

count : int

The number of items to remove.

Returns: 'T seq

The result sequence.

ArgumentException Thrown when index is outside 0..source.Length - count

SeqExtensionsConstrained.sort source

Full Usage: SeqExtensionsConstrained.sort source

Parameters:
    source : 'T seq - The input sequence.

Returns: 'T seq The result sequence.
Modifiers: inline
Type parameters: 'T

Yields a sequence ordered by keys.

This function returns a sequence that digests the whole initial sequence as soon as that sequence is iterated. As a result this function should not be used with large or infinite sequences. The function makes no assumption on the ordering of the original sequence. This is a stable sort, that is the original order of equal elements is preserved.

source : 'T seq

The input sequence.

Returns: 'T seq

The result sequence.

ArgumentNullException Thrown when the input sequence is null.

SeqExtensionsConstrained.sortDescending source

Full Usage: SeqExtensionsConstrained.sortDescending source

Parameters:
    source : 'T seq - The input sequence.

Returns: 'T seq The result sequence.
Modifiers: inline
Type parameters: 'T

Yields a sequence ordered descending by keys.

This function returns a sequence that digests the whole initial sequence as soon as that sequence is iterated. As a result this function should not be used with large or infinite sequences. The function makes no assumption on the ordering of the original sequence. This is a stable sort, that is the original order of equal elements is preserved.

source : 'T seq

The input sequence.

Returns: 'T seq

The result sequence.

ArgumentNullException Thrown when the input sequence is null.

SeqExtensionsConstrained.sum source

Full Usage: SeqExtensionsConstrained.sum source

Parameters:
    source : ^T seq - The input sequence.

Returns: ^T The computed sum.
Modifiers: inline
Type parameters: ^T

Returns the sum of the elements in the sequence.

The elements are summed using the + operator and Zero property associated with the generated type.

source : ^T seq

The input sequence.

Returns: ^T

The computed sum.

SeqExtensionsConstrained.sumBy (source, projection)

Full Usage: SeqExtensionsConstrained.sumBy (source, projection)

Parameters:
    source : 'T seq - The input sequence.
    projection : 'T -> ^U - A function to transform items from the input sequence into the type that will be summed.

Returns: ^U The computed sum.
Modifiers: inline
Type parameters: 'T, ^U

Returns the sum of the results generated by applying the function to each element of the sequence.

The generated elements are summed using the + operator and Zero property associated with the generated type.

source : 'T seq

The input sequence.

projection : 'T -> ^U

A function to transform items from the input sequence into the type that will be summed.

Returns: ^U

The computed sum.

SeqExtensionsConstrained.tryExactlyOne source

Full Usage: SeqExtensionsConstrained.tryExactlyOne source

Parameters:
    source : 'T seq

Returns: 'T option The only element of the sequence or None.
Modifiers: inline
Type parameters: 'T

Returns the only element of the sequence or None if it is empty or contains more than one element.

source : 'T seq
Returns: 'T option

The only element of the sequence or None.

ArgumentNullException Thrown when the input sequence is null.

SeqExtensionsConstrained.updateAt (source, index, value)

Full Usage: SeqExtensionsConstrained.updateAt (source, index, value)

Parameters:
    source : 'T seq
    index : int - The index of the item to be replaced.
    value : 'T - The new value.

Returns: 'T seq The result sequence.
Modifiers: inline
Type parameters: 'T

Return a new sequence with the item at a given index set to the new value.

source : 'T seq
index : int

The index of the item to be replaced.

value : 'T

The new value.

Returns: 'T seq

The result sequence.

ArgumentException Thrown when index is outside 0..source.Length - 1

Type something to start searching.