Header menu logo FSharp.Core.Fluent

ListExtensionsConstrained Type

Static members

Static member Description

ListExtensionsConstrained.allPairs (list, list2)

Full Usage: ListExtensionsConstrained.allPairs (list, list2)

Parameters:
    list : 'T list
    list2 : 'U list - The second input list.

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

Returns a new list that contains all pairings of elements from two lists.

list : 'T list
list2 : 'U list

The second input list.

Returns: ('T * 'U) list

The resulting list of pairs.

ListExtensionsConstrained.average list

Full Usage: ListExtensionsConstrained.average list

Parameters:
    list : ^T list - The input list.

Returns: ^T The average of the elements in the list.
Modifiers: inline
Type parameters: ^T

Returns the average of the elements in the list.

list : ^T list

The input list.

Returns: ^T

The average of the elements in the list.

ArgumentException Thrown when list is empty.

ListExtensionsConstrained.averageBy (list, projection)

Full Usage: ListExtensionsConstrained.averageBy (list, projection)

Parameters:
    list : 'T list - The input list.
    projection : 'T -> ^U - The function to transform the list elements before averaging.

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

Returns the average of the elements generated by applying the function to each element of the list.

list : 'T list

The input list.

projection : 'T -> ^U

The function to transform the list elements before averaging.

Returns: ^U

The computed average.

ArgumentException Thrown when list is empty.

ListExtensionsConstrained.distinct list

Full Usage: ListExtensionsConstrained.distinct list

Parameters:
    list : 'T list - The input list.

Returns: 'T list The result list.
Modifiers: inline
Type parameters: 'T

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

list : 'T list

The input list.

Returns: 'T list

The result list.

ListExtensionsConstrained.insertAt (list, index, value)

Full Usage: ListExtensionsConstrained.insertAt (list, index, value)

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

Returns: 'T list The result list.
Modifiers: inline
Type parameters: 'T

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

list : 'T list
index : int

The index where the item should be inserted.

value : 'T

The value to insert.

Returns: 'T list

The result list.

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

ListExtensionsConstrained.insertManyAt (list, index, values)

Full Usage: ListExtensionsConstrained.insertManyAt (list, index, values)

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

Returns: 'T list The result list.
Modifiers: inline
Type parameters: 'T

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

list : 'T list
index : int

The index where the items should be inserted.

values : 'T seq

The values to insert.

Returns: 'T list

The result list.

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

ListExtensionsConstrained.max list

Full Usage: ListExtensionsConstrained.max list

Parameters:
    list : 'T list - The input list.

Returns: 'T The maximum element.
Modifiers: inline
Type parameters: 'T

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

Throws ArgumentException for empty arrays.

list : 'T list

The input list.

Returns: 'T

The maximum element.

ArgumentException Thrown when the input list is empty.

ListExtensionsConstrained.maxBy (list, projection)

Full Usage: ListExtensionsConstrained.maxBy (list, projection)

Parameters:
    list : 'T list - The input list.
    projection : 'T -> 'Key - The function to transform the elements into a type supporting comparison.

Returns: 'T The maximum element.
Modifiers: inline
Type parameters: 'T, 'Key

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

Throws ArgumentException for empty arrays.

list : 'T list

The input list.

projection : 'T -> 'Key

The function to transform the elements into a type supporting comparison.

Returns: 'T

The maximum element.

ArgumentException Thrown when the input list is empty.

ListExtensionsConstrained.min list

Full Usage: ListExtensionsConstrained.min list

Parameters:
    list : 'T list - The input list.

Returns: 'T The minimum element.
Modifiers: inline
Type parameters: 'T

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

Throws ArgumentException for empty arrays

list : 'T list

The input list.

Returns: 'T

The minimum element.

ArgumentException Thrown when the input list is empty.

ListExtensionsConstrained.minBy (list, projection)

Full Usage: ListExtensionsConstrained.minBy (list, projection)

Parameters:
    list : 'T list - The input list.
    projection : 'T -> 'Key - The function to transform the elements into a type supporting comparison.

Returns: 'T The minimum element.
Modifiers: inline
Type parameters: 'T, 'Key

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

Throws ArgumentException for empty arrays.

list : 'T list

The input list.

projection : 'T -> 'Key

The function to transform the elements into a type supporting comparison.

Returns: 'T

The minimum element.

ArgumentException Thrown when the input list is empty.

ListExtensionsConstrained.removeAt (list, index)

Full Usage: ListExtensionsConstrained.removeAt (list, index)

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

Returns: 'T list The result list.
Modifiers: inline
Type parameters: 'T

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

list : 'T list
index : int

The index of the item to be removed.

Returns: 'T list

The result list.

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

ListExtensionsConstrained.removeManyAt (list, index, count)

Full Usage: ListExtensionsConstrained.removeManyAt (list, index, count)

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

Returns: 'T list The result list.
Modifiers: inline
Type parameters: 'T

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

list : 'T list
index : int

The index of the item to be removed.

count : int

The number of items to remove.

Returns: 'T list

The result list.

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

ListExtensionsConstrained.sort list

Full Usage: ListExtensionsConstrained.sort list

Parameters:
    list : 'T list - The input list.

Returns: 'T list The sorted list.
Modifiers: inline
Type parameters: 'T

Sorts the elements of an list, returning a new list. Elements are compared using Operators.compare.

This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. For a stable sort, consider using Seq.sort.

list : 'T list

The input list.

Returns: 'T list

The sorted list.

ListExtensionsConstrained.splitAt (list, index)

Full Usage: ListExtensionsConstrained.splitAt (list, index)

Parameters:
    list : 'T list
    index : int - The index at which the list is split.

Returns: 'T list * 'T list The two split lists.
Modifiers: inline
Type parameters: 'T

Splits a list into two lists, at the given index.

list : 'T list
index : int

The index at which the list is split.

Returns: 'T list * 'T list

The two split lists.

InvalidOperationException Thrown when split index exceeds the number of elements in the list.

ListExtensionsConstrained.sum list

Full Usage: ListExtensionsConstrained.sum list

Parameters:
    list : ^T list - The input list.

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

Returns the sum of the elements in the list.

list : ^T list

The input list.

Returns: ^T

The resulting sum.

ListExtensionsConstrained.sumBy (list, projection)

Full Usage: ListExtensionsConstrained.sumBy (list, projection)

Parameters:
    list : 'T list - The input list.
    projection : 'T -> ^U - The function to transform the list elements into the type to be summed.

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

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

list : 'T list

The input list.

projection : 'T -> ^U

The function to transform the list elements into the type to be summed.

Returns: ^U

The resulting sum.

ListExtensionsConstrained.tryExactlyOne list

Full Usage: ListExtensionsConstrained.tryExactlyOne list

Parameters:
    list : 'T list

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

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

list : 'T list
Returns: 'T option

The only element of the list or None.

ListExtensionsConstrained.unzip list

Full Usage: ListExtensionsConstrained.unzip list

Parameters:
    list : ('a * 'b) list - The input list.

Returns: 'a list * 'b list The two arrays.
Modifiers: inline
Type parameters: 'a, 'b

Splits an list of pairs into two arrays.

list : ('a * 'b) list

The input list.

Returns: 'a list * 'b list

The two arrays.

ListExtensionsConstrained.unzip3 list

Full Usage: ListExtensionsConstrained.unzip3 list

Parameters:
    list : ('a * 'b * 'c) list - The input list.

Returns: 'a list * 'b list * 'c list The tuple of three arrays.
Modifiers: inline
Type parameters: 'a, 'b, 'c

Splits an list of triples into three arrays.

list : ('a * 'b * 'c) list

The input list.

Returns: 'a list * 'b list * 'c list

The tuple of three arrays.

ListExtensionsConstrained.updateAt (list, index, value)

Full Usage: ListExtensionsConstrained.updateAt (list, index, value)

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

Returns: 'T list The result list.
Modifiers: inline
Type parameters: 'T

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

list : 'T list
index : int

The index of the item to be replaced.

value : 'T

The new value.

Returns: 'T list

The result list.

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

Type something to start searching.