Header menu logo FSharp.Core.Fluent

ListExtensions Module

Fluent extension operations on lists.

Type extensions

Type extension Description

this.allPairs list2

Full Usage: this.allPairs list2

Parameters:
    list2 : 'a list - The second input list.

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

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

Extended Type: List

list2 : 'a list

The second input list.

Returns: ('T * 'a) list

The resulting list of pairs.

this.append list2

Full Usage: this.append list2

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

Returns: 'T list The resulting list.
Modifiers: inline

Builds a new list that contains the elements of the first list followed by the elements of the second list.

Extended Type: List

list2 : 'T list

The second input list.

Returns: 'T list

The resulting list.

this.choose chooser

Full Usage: this.choose chooser

Parameters:
    chooser : 'T -> 'a option - The function to generate options from the elements.

Returns: 'a list The list of results.
Modifiers: inline
Type parameters: 'a

Applies the given function to each element of the list. Returns the list comprised of the results "x" for each element where the function returns Some(x)

Extended Type: List

chooser : 'T -> 'a option

The function to generate options from the elements.

Returns: 'a list

The list of results.

this.collect mapping

Full Usage: this.collect mapping

Parameters:
    mapping : 'T -> 'a list - The function to create sub- lists from the input list elements.

Returns: 'a list The concatenation of the sub- lists.
Modifiers: inline
Type parameters: 'a

For each element of the list, applies the given function. Concatenates all the results and return the combined list.

Extended Type: List

mapping : 'T -> 'a list

The function to create sub- lists from the input list elements.

Returns: 'a list

The concatenation of the sub- lists.

this.concat lists

Full Usage: this.concat lists

Parameters:
    lists : 'T list[] - The input sequence of lists.

Returns: 'T list The concatenation of the sequence of input lists.
Modifiers: inline

Builds a new list that contains the elements of each of the given sequence of lists.

Extended Type: List

lists : 'T list[]

The input sequence of lists.

Returns: 'T list

The concatenation of the sequence of input lists.

this.countBy projection

Full Usage: this.countBy projection

Parameters:
    projection : 'T -> 'Key - A function transforming each item of the input list into a key to be compared against the others.

Returns: ('Key * int) list The result list.
Modifiers: inline
Type parameters: 'Key

Applies a key-generating function to each element of a list and returns a list yielding unique keys and their number of occurrences in the original list.

Extended Type: List

projection : 'T -> 'Key

A function transforming each item of the input list into a key to be compared against the others.

Returns: ('Key * int) list

The result list.

this.distinctBy projection

Full Usage: this.distinctBy projection

Parameters:
    projection : 'T -> 'Key - A function transforming the list items into comparable keys.

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

Returns a list that contains no duplicate entries according to the generic hash and equality comparisons on the keys returned by the given key-generating function. If an element occurs multiple times in the list then the later occurrences are discarded.

Extended Type: List

projection : 'T -> 'Key

A function transforming the list items into comparable keys.

Returns: 'T list

The result list.

this.exactlyOne ()

Full Usage: this.exactlyOne ()

Parameters:
    () : unit

Returns: 'T The only element of the list.
Modifiers: inline

Returns the only element of the list.

Extended Type: List

() : unit
Returns: 'T

The only element of the list.

ArgumentException Thrown when the input does not have precisely one element.

this.exists predicate

Full Usage: this.exists predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: bool True if any result from predicate is true.
Modifiers: inline

Tests if any element of the list satisfies the given predicate.

The predicate is applied to the elements of the input list. If any application returns true then the overall result is true and no further elements are tested. Otherwise, false is returned.

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: bool

True if any result from predicate is true.

this.filter predicate

Full Usage: this.filter predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: 'T list An list containing the elements for which the given predicate returns true.
Modifiers: inline

Returns a new collection containing only the elements of the collection for which the given predicate returns "true".

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: 'T list

An list containing the elements for which the given predicate returns true.

this.find predicate

Full Usage: this.find predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: 'T The first element for which predicate returns true.
Modifiers: inline

Returns the first element for which the given function returns 'true'. Raise KeyNotFoundException if no such element exists.

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: 'T

The first element for which predicate returns true.

KeyNotFoundException Thrown if predicate never returns true.

this.findIndex predicate

Full Usage: this.findIndex predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: int The index of the first element in the list that satisfies the given predicate.
Modifiers: inline

Returns the index of the first element in the list that satisfies the given predicate. Raise KeyNotFoundException if none of the elements satisy the predicate.

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: int

The index of the first element in the list that satisfies the given predicate.

KeyNotFoundException Thrown if predicate never returns true.

this.fold (state, folder)

Full Usage: this.fold (state, folder)

Parameters:
    state : 'State - The initial state.
    folder : 'State -> 'T -> 'State - The function to update the state given the input elements.

Returns: 'State The final state.
Modifiers: inline
Type parameters: 'State

Applies a function to each element of the collection, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN then computes f (... (f s i0)...) iN

Extended Type: List

state : 'State

The initial state.

folder : 'State -> 'T -> 'State

The function to update the state given the input elements.

Returns: 'State

The final state.

this.foldBack (folder, state)

Full Usage: this.foldBack (folder, state)

Parameters:
    folder : 'T -> 'State -> 'State - The function to update the state given the input elements.
    state : 'State - The initial state.

Returns: 'State The final state.
Modifiers: inline
Type parameters: 'State

Applies a function to each element of the list, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN then computes f i0 (...(f iN s))

Extended Type: List

folder : 'T -> 'State -> 'State

The function to update the state given the input elements.

state : 'State

The initial state.

Returns: 'State

The final state.

this.forall predicate

Full Usage: this.forall predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: bool True if all of the list elements satisfy the predicate.
Modifiers: inline

Tests if all elements of the list satisfy the given predicate.

The predicate is applied to the elements of the input collection. If any application returns false then the overall result is false and no further elements are tested. Otherwise, true is returned.

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: bool

True if all of the list elements satisfy the predicate.

this.groupBy projection

Full Usage: this.groupBy projection

Parameters:
    projection : 'T -> 'Key - A function that transforms an element of the list into a comparable key.

Returns: ('Key * 'T list) list The result list.
Modifiers: inline
Type parameters: 'Key

Applies a key-generating function to each element of a list and yields a list of unique keys. Each unique key contains a list of all elements that match to this key.

Extended Type: List

projection : 'T -> 'Key

A function that transforms an element of the list into a comparable key.

Returns: ('Key * 'T list) list

The result list.

this.head ()

Full Usage: this.head ()

Parameters:
    () : unit

Returns: 'T The first element of the list.
Modifiers: inline

Returns the first element of the list.

Extended Type: List

() : unit
Returns: 'T

The first element of the list.

ArgumentException Thrown when the list is empty.

this.indexed ()

Full Usage: this.indexed ()

Parameters:
    () : unit

Returns: (int * 'T) list The result list.
Modifiers: inline

Builds a new collection whose elements are the corresponding elements of the input collection paired with the integer index (from 0) of each element.

Extended Type: List

() : unit
Returns: (int * 'T) list

The result list.

this.insertAt (index, value)

Full Usage: this.insertAt (index, value)

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

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

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

Extended Type: 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.

this.insertManyAt (index, values)

Full Usage: this.insertManyAt (index, values)

Parameters:
    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

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

Extended Type: 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.

this.iter action

Full Usage: this.iter action

Parameters:
    action : 'T -> unit - The function to apply.

Modifiers: inline

Applies the given function to each element of the list.

Extended Type: List

action : 'T -> unit

The function to apply.

this.iteri action

Full Usage: this.iteri action

Parameters:
    action : int -> 'T -> unit - The function to apply to each index and element.

Modifiers: inline

Applies the given function to each element of the list. The integer passed to the function indicates the index of element.

Extended Type: List

action : int -> 'T -> unit

The function to apply to each index and element.

this.last ()

Full Usage: this.last ()

Parameters:
    () : unit

Returns: 'T The last element of the list.
Modifiers: inline

Returns the last element of the list.

Extended Type: List

() : unit
Returns: 'T

The last element of the list.

ArgumentException Thrown when the input does not have any elements.

this.length ()

Full Usage: this.length ()

Parameters:
    () : unit

Returns: int The length of the list.
Modifiers: inline

Returns the length of an list. You can also use property source.Length.

Extended Type: List

() : unit
Returns: int

The length of the list.

this.length

Full Usage: this.length

Returns: int The length of the list.
Modifiers: inline

Returns the length of an list. You can also use property source.Length.

Extended Type: List

Returns: int

The length of the list.

this.map mapping

Full Usage: this.map mapping

Parameters:
    mapping : 'T -> 'a - The function to transform elements of the list.

Returns: 'a list The list of transformed elements.
Modifiers: inline
Type parameters: 'a

Builds a new list whose elements are the results of applying the given function to each of the elements of the list.

Extended Type: List

mapping : 'T -> 'a

The function to transform elements of the list.

Returns: 'a list

The list of transformed elements.

this.mapi mapping

Full Usage: this.mapi mapping

Parameters:
    mapping : int -> 'T -> 'a - The function to transform elements and their indices.

Returns: 'a list The list of transformed elements.
Modifiers: inline
Type parameters: 'a

Builds a new list whose elements are the results of applying the given function to each of the elements of the list. The integer index passed to the function indicates the index of element being transformed.

Extended Type: List

mapping : int -> 'T -> 'a

The function to transform elements and their indices.

Returns: 'a list

The list of transformed elements.

this.pairwise ()

Full Usage: this.pairwise ()

Parameters:
    () : unit

Returns: ('T * 'T) list The result list.
Modifiers: inline

Returns a list of each element in the input list and its predecessor, with the exception of the first element which is only returned as the predecessor of the second element.

Extended Type: List

() : unit
Returns: ('T * 'T) list

The result list.

this.partition predicate

Full Usage: this.partition predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: 'T list * 'T list A pair of lists. The first containing the elements the predicate evaluated to true, and the second containing those evaluated to false.
Modifiers: inline

Splits the collection into two collections, containing the elements for which the given predicate returns "true" and "false" respectively.

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: 'T list * 'T list

A pair of lists. The first containing the elements the predicate evaluated to true, and the second containing those evaluated to false.

this.permute indexMap

Full Usage: this.permute indexMap

Parameters:
    indexMap : int -> int - The function that maps input indices to output indices.

Returns: 'T list The output list.
Modifiers: inline

Returns an list with all elements permuted according to the specified permutation.

Extended Type: List

indexMap : int -> int

The function that maps input indices to output indices.

Returns: 'T list

The output list.

this.pick chooser

Full Usage: this.pick chooser

Parameters:
    chooser : 'T -> 'a option - The function to generate options from the elements.

Returns: 'a The first result.
Modifiers: inline
Type parameters: 'a

Applies the given function to successive elements, returning the first result where function returns Some(x) for some x. If the function never returns Some(x) then KeyNotFoundException is raised.

Extended Type: List

chooser : 'T -> 'a option

The function to generate options from the elements.

Returns: 'a

The first result.

KeyNotFoundException Thrown if every result from chooser is None.

this.reduce reduction

Full Usage: this.reduce reduction

Parameters:
    reduction : 'T -> 'T -> 'T - The function to reduce a pair of elements to a single element.

Returns: 'T The final result of the redcutions.
Modifiers: inline

Applies a function to each element of the list, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN then computes f (... (f i0 i1)...) iN. Raises ArgumentException if the list has size zero.

Extended Type: List

reduction : 'T -> 'T -> 'T

The function to reduce a pair of elements to a single element.

Returns: 'T

The final result of the redcutions.

ArgumentException Thrown when the input list is empty.

this.reduceBack reduction

Full Usage: this.reduceBack reduction

Parameters:
    reduction : 'T -> 'T -> 'T - The function to reduce a pair of elements to a single element.

Returns: 'T The final result of the reductions.
Modifiers: inline

Applies a function to each element of the list, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN then computes f i0 (...(f iN-1 iN)). Raises ArgumentException if the list has size zero.

Extended Type: List

reduction : 'T -> 'T -> 'T

The function to reduce a pair of elements to a single element.

Returns: 'T

The final result of the reductions.

ArgumentException Thrown when the input list is empty.

this.removeAt index

Full Usage: this.removeAt index

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

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

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

Extended Type: 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

this.removeManyAt (index, count)

Full Usage: this.removeManyAt (index, count)

Parameters:
    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

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

Extended Type: 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

this.reverse ()

Full Usage: this.reverse ()

Parameters:
    () : unit

Returns: 'T list The reversed list.
Modifiers: inline

Returns a new list with the elements in reverse order.

Extended Type: List

() : unit
Returns: 'T list

The reversed list.

this.scan (state, folder)

Full Usage: this.scan (state, folder)

Parameters:
    state : 'State - The initial state.
    folder : 'State -> 'T -> 'State - The function to update the state given the input elements.

Returns: 'State list The list of state values.
Modifiers: inline
Type parameters: 'State

Like fold, but return the intermediary and final results.

Extended Type: List

state : 'State

The initial state.

folder : 'State -> 'T -> 'State

The function to update the state given the input elements.

Returns: 'State list

The list of state values.

this.scanBack (folder, state)

Full Usage: this.scanBack (folder, state)

Parameters:
    folder : 'T -> 'State -> 'State - The function to update the state given the input elements.
    state : 'State - The initial state.

Returns: 'State list The list of state values.
Modifiers: inline
Type parameters: 'State

Like foldBack, but return both the intermediary and final results.

Extended Type: List

folder : 'T -> 'State -> 'State

The function to update the state given the input elements.

state : 'State

The initial state.

Returns: 'State list

The list of state values.

this.skip count

Full Usage: this.skip count

Parameters:
    count : int - The number of elements to skip.

Returns: 'T list The list after removing the first N elements.
Modifiers: inline

Returns the list after removing the first N elements.

Extended Type: List

count : int

The number of elements to skip.

Returns: 'T list

The list after removing the first N elements.

ArgumentException Thrown when count is negative or exceeds the number of elements in the list.

this.skipWhile predicate

Full Usage: this.skipWhile predicate

Parameters:
    predicate : 'T -> bool - A function that evaluates an element of the list to a boolean value.

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

Bypasses elements in a list while the given predicate returns true, and then returns the remaining elements of the list.

Extended Type: List

predicate : 'T -> bool

A function that evaluates an element of the list to a boolean value.

Returns: 'T list

The result list.

this.sortBy projection

Full Usage: this.sortBy projection

Parameters:
    projection : 'T -> 'Key - The function to transform list elements into the type that is compared.

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

Sorts the elements of an list, using the given projection for the keys and 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.

Extended Type: List

projection : 'T -> 'Key

The function to transform list elements into the type that is compared.

Returns: 'T list

The sorted list.

this.sortByDescending projection

Full Usage: this.sortByDescending projection

Parameters:
    projection : 'T -> 'Key - The function to transform the list elements into the type to be compared.

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

Sorts the given list in descending order using keys given by the given projection. Keys are compared using Operators.compare.

This is a stable sort, i.e. the original order of equal elements is preserved.

Extended Type: List

projection : 'T -> 'Key

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

Returns: 'T list

The sorted list.

this.sortWith comparer

Full Usage: this.sortWith comparer

Parameters:
    comparer : 'T -> 'T -> int - The function to compare pairs of list elements.

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

Sorts the elements of an list, using the given comparison function as the order, returning a new list.

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.

Extended Type: List

comparer : 'T -> 'T -> int

The function to compare pairs of list elements.

Returns: 'T list

The sorted list.

this.splitAt index

Full Usage: this.splitAt index

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

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

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

Extended Type: 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.

this.tail ()

Full Usage: this.tail ()

Parameters:
    () : unit

Returns: 'T list The list after removing the first element.
Modifiers: inline

Returns the list after removing the first element.

Extended Type: List

() : unit
Returns: 'T list

The list after removing the first element.

ArgumentException Thrown when the list is empty.

this.take count

Full Usage: this.take count

Parameters:
    count : int - The number of items to take.

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

Returns the first N elements of the list.

Throws InvalidOperationException if the count exceeds the number of elements in the list. List.truncate returns as many items as the list contains instead of throwing an exception.

Extended Type: List

count : int

The number of items to take.

Returns: 'T list

The result list.

ArgumentException Thrown when the input list is empty.
InvalidOperationException Thrown when count exceeds the number of elements in the list.

this.takeWhile predicate

Full Usage: this.takeWhile predicate

Parameters:
    predicate : 'T -> bool - A function that evaluates to false when no more items should be returned.

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

Returns a list that contains all elements of the original list while the given predicate returns true, and then returns no further elements.

Extended Type: List

predicate : 'T -> bool

A function that evaluates to false when no more items should be returned.

Returns: 'T list

The result list.

this.toSeq ()

Full Usage: this.toSeq ()

Parameters:
    () : unit

Returns: 'T seq The sequence of list elements.
Modifiers: inline

Views the given list as a sequence.

Extended Type: List

() : unit
Returns: 'T seq

The sequence of list elements.

List.transpose lists

Full Usage: List.transpose lists

Parameters:
    lists : 'T list seq - The input sequence of lists.

Returns: 'T list list The transposed list.
Modifiers: inline

Returns the transpose of the given sequence of lists.

Extended Type: List

lists : 'T list seq

The input sequence of lists.

Returns: 'T list list

The transposed list.

ArgumentNullException Thrown when the input sequence is null.
ArgumentException Thrown when the input lists differ in length.

this.truncate count

Full Usage: this.truncate count

Parameters:
    count : int - The maximum number of items to return.

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

Returns at most N elements in a new list.

Extended Type: List

count : int

The maximum number of items to return.

Returns: 'T list

The result list.

ArgumentException Thrown when the count is negative.

this.tryExactlyOne ()

Full Usage: this.tryExactlyOne ()

Parameters:
    () : unit

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

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

Extended Type: List

() : unit
Returns: 'T option

The only element of the list or None.

this.tryFind predicate

Full Usage: this.tryFind predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: 'T option The first element that satisfies the predicate, or None.
Modifiers: inline

Returns the first element for which the given function returns true. Return None if no such element exists.

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: 'T option

The first element that satisfies the predicate, or None.

this.tryFindBack predicate

Full Usage: this.tryFindBack predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: 'T option The last element for which the predicate returns true, or None if every element evaluates to false.
Modifiers: inline

Returns the last element for which the given function returns true.. Return None if no such element exists.

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: 'T option

The last element for which the predicate returns true, or None if every element evaluates to false.

this.tryFindIndex predicate

Full Usage: this.tryFindIndex predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: int option The index of the first element that satisfies the predicate, or None.
Modifiers: inline

Returns the index of the first element in the list that satisfies the given predicate.

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: int option

The index of the first element that satisfies the predicate, or None.

this.tryFindIndexBack predicate

Full Usage: this.tryFindIndexBack predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: int option The index of the last element for which the predicate returns true, or None if every element evaluates to false.
Modifiers: inline

Returns the index of the last element in the list that satisfies the given predicate. Return None if no such element exists.

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: int option

The index of the last element for which the predicate returns true, or None if every element evaluates to false.

this.tryHead ()

Full Usage: this.tryHead ()

Parameters:
    () : unit

Returns: 'T option The first element of the list or None.
Modifiers: inline

Returns the first element of the list, or None if the list is empty.

Extended Type: List

() : unit
Returns: 'T option

The first element of the list or None.

this.tryItem index

Full Usage: this.tryItem index

Parameters:
    index : int - The index to retrieve.

Returns: 'T option The value at the given index or None.
Modifiers: inline

Tries to find the nth element in the list. Returns None if index is negative or the list does not contain enough elements.

Extended Type: List

index : int

The index to retrieve.

Returns: 'T option

The value at the given index or None.

this.tryLast ()

Full Usage: this.tryLast ()

Parameters:
    () : unit

Returns: 'T option The last element of the list or None.
Modifiers: inline

Returns the last element of the list. Return None if no such element exists.

Extended Type: List

() : unit
Returns: 'T option

The last element of the list or None.

this.tryPick chooser

Full Usage: this.tryPick chooser

Parameters:
    chooser : 'T -> 'a option - The function to transform the list elements into options.

Returns: 'a option The first transformed element that is Some(x).
Modifiers: inline
Type parameters: 'a

Applies the given function to successive elements, returning the first result where function returns Some(x) for some x. If the function never returns Some(x) then None is returned.

Extended Type: List

chooser : 'T -> 'a option

The function to transform the list elements into options.

Returns: 'a option

The first transformed element that is Some(x).

this.updateAt (index, value)

Full Usage: this.updateAt (index, value)

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

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

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

Extended Type: 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

this.where predicate

Full Usage: this.where predicate

Parameters:
    predicate : 'T -> bool - The function to test the input elements.

Returns: 'T list A list containing only the elements that satisfy the predicate.
Modifiers: inline

Returns a new list containing only the elements of the list for which the given predicate returns "true"

Extended Type: List

predicate : 'T -> bool

The function to test the input elements.

Returns: 'T list

A list containing only the elements that satisfy the predicate.

this.windowed windowSize

Full Usage: this.windowed windowSize

Parameters:
    windowSize : int - The number of elements in each window.

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

Returns a list of sliding windows containing elements drawn from the input list. Each window is returned as a fresh list.

Extended Type: List

windowSize : int

The number of elements in each window.

Returns: 'T list list

The result list.

ArgumentException Thrown when windowSize is not positive.

this.zip list2

Full Usage: this.zip list2

Parameters:
    list2 : 'T2 list - The second input list.

Returns: ('T * 'T2) list The list of tupled elements.
Modifiers: inline
Type parameters: 'T2

Combines the two lists into an list of pairs. The two lists must have equal lengths, otherwise an ArgumentException is raised.

Extended Type: List

list2 : 'T2 list

The second input list.

Returns: ('T * 'T2) list

The list of tupled elements.

ArgumentException Thrown when the input lists differ in length.

this.zip3 (list2, list3)

Full Usage: this.zip3 (list2, list3)

Parameters:
    list2 : 'T2 list - The second input list.
    list3 : 'T3 list - The third input list.

Returns: ('T * 'T2 * 'T3) list The list of tupled elements.
Modifiers: inline
Type parameters: 'T2, 'T3

Combines three lists into an list of pairs. The three lists must have equal lengths, otherwise an ArgumentException is raised.

Extended Type: List

list2 : 'T2 list

The second input list.

list3 : 'T3 list

The third input list.

Returns: ('T * 'T2 * 'T3) list

The list of tupled elements.

ArgumentException Thrown when the input lists differ in length.

Type something to start searching.