Header menu logo FSharp.Data.Adaptive

AList Module

Functional operators for the alist<_> type.

Functions and values

Function or value Description

append l r

Full Usage: append l r

Parameters:
Returns: alist<'T>

Adaptively concatenates the given lists.

l : alist<'T>
r : alist<'T>
Returns: alist<'T>

average list

Full Usage: average list

Parameters:
Returns: aval<^S>
Modifiers: inline
Type parameters: ^T, ^S

Adaptively computes the average of all entries in the list.

list : alist<^T>
Returns: aval<^S>

averageBy mapping list

Full Usage: averageBy mapping list

Parameters:
    mapping : 'T1 -> ^T2
    list : alist<'T1>

Returns: aval<^S>
Modifiers: inline
Type parameters: 'T1, ^T2, ^S

Adaptively computes the average of all values returned by mapping for the list.

mapping : 'T1 -> ^T2
list : alist<'T1>
Returns: aval<^S>

averageByA mapping list

Full Usage: averageByA mapping list

Parameters:
    mapping : 'T1 -> aval<^T2>
    list : alist<'T1>

Returns: aval<^S>
Modifiers: inline
Type parameters: 'T1, ^T2, ^S

Adaptively computes the average of all values returned by mapping for the list.

mapping : 'T1 -> aval<^T2>
list : alist<'T1>
Returns: aval<^S>

bind mapping value

Full Usage: bind mapping value

Parameters:
    mapping : 'T1 -> alist<'T2>
    value : aval<'T1>

Returns: alist<'T2>

Adaptively maps over the given aval and returns the resulting list.

mapping : 'T1 -> alist<'T2>
value : aval<'T1>
Returns: alist<'T2>

bind2 mapping valueA valueB

Full Usage: bind2 mapping valueA valueB

Parameters:
    mapping : 'A -> 'B -> alist<'C>
    valueA : aval<'A>
    valueB : aval<'B>

Returns: alist<'C>

Adaptively maps over the given avals and returns the resulting list.

mapping : 'A -> 'B -> alist<'C>
valueA : aval<'A>
valueB : aval<'B>
Returns: alist<'C>

bind3 mapping valueA valueB valueC

Full Usage: bind3 mapping valueA valueB valueC

Parameters:
    mapping : 'A -> 'B -> 'C -> alist<'D>
    valueA : aval<'A>
    valueB : aval<'B>
    valueC : aval<'C>

Returns: alist<'D>

Adaptively maps over the given avals and returns the resulting list.

mapping : 'A -> 'B -> 'C -> alist<'D>
valueA : aval<'A>
valueB : aval<'B>
valueC : aval<'C>
Returns: alist<'D>

choose mapping list

Full Usage: choose mapping list

Parameters:
    mapping : 'T1 -> 'T2 option
    list : alist<'T1>

Returns: alist<'T2>

Adaptively chooses all elements returned by mapping.

mapping : 'T1 -> 'T2 option
list : alist<'T1>
Returns: alist<'T2>

chooseA mapping list

Full Usage: chooseA mapping list

Parameters:
    mapping : 'T1 -> aval<'T2 option>
    list : alist<'T1>

Returns: alist<'T2>

Adaptively chooses all elements returned by mapping.

mapping : 'T1 -> aval<'T2 option>
list : alist<'T1>
Returns: alist<'T2>

chooseAi mapping list

Full Usage: chooseAi mapping list

Parameters:
Returns: alist<'T2>

Adaptively chooses all elements returned by mapping.

mapping : Index -> 'T1 -> aval<'T2 option>
list : alist<'T1>
Returns: alist<'T2>

choosei mapping list

Full Usage: choosei mapping list

Parameters:
    mapping : Index -> 'T1 -> 'T2 option
    list : alist<'T1>

Returns: alist<'T2>

Adaptively chooses all elements returned by mapping.

mapping : Index -> 'T1 -> 'T2 option
list : alist<'T1>
Returns: alist<'T2>

collect mapping list

Full Usage: collect mapping list

Parameters:
Returns: alist<'T2>

Adaptively applies the given mapping function to all elements and returns a new alist holding the concatenated results.

mapping : 'T1 -> alist<'T2>
list : alist<'T1>
Returns: alist<'T2>

collect' mapping list

Full Usage: collect' mapping list

Parameters:
    mapping : 'T1 -> 'T2 seq
    list : alist<'T1>

Returns: alist<'T2>

Adaptively applies the given mapping function to all elements and returns a new alist holding the concatenated results.

mapping : 'T1 -> 'T2 seq
list : alist<'T1>
Returns: alist<'T2>

collecti mapping list

Full Usage: collecti mapping list

Parameters:
Returns: alist<'T2>

Adaptively applies the given mapping function to all elements and returns a new alist holding the concatenated results.

mapping : Index -> 'T1 -> alist<'T2>
list : alist<'T1>
Returns: alist<'T2>

concat lists

Full Usage: concat lists

Parameters:
    lists : 'a

Returns: alist<'T>

Adaptively concatenates the given lists.

lists : 'a
Returns: alist<'T>

constant value

Full Usage: constant value

Parameters:
Returns: alist<'T>

Creates an alist using the given value generator

value : unit -> IndexList<'T>
Returns: alist<'T>

count arg1

Full Usage: count arg1

Parameters:
Returns: aval<int>

Adaptively gets the number of elements in the list.

arg0 : alist<'T>
Returns: aval<int>

countBy predicate list

Full Usage: countBy predicate list

Parameters:
    predicate : 'a -> bool
    list : alist<'a>

Returns: aval<int>

Adaptively counts all elements fulfilling the predicate

predicate : 'a -> bool
list : alist<'a>
Returns: aval<int>

countByA predicate list

Full Usage: countByA predicate list

Parameters:
    predicate : 'a -> aval<bool>
    list : alist<'a>

Returns: aval<int>

Adaptively counts all elements fulfilling the predicate

predicate : 'a -> aval<bool>
list : alist<'a>
Returns: aval<int>

custom compute

Full Usage: custom compute

Parameters:
Returns: alist<'T>

Creates an alist using the given compute function

compute : AdaptiveToken -> IndexList<'T> -> IndexListDelta<'T>
Returns: alist<'T>

empty

Full Usage: empty

Returns: alist<'T>

The empty alist.

Returns: alist<'T>

exists predicate list

Full Usage: exists predicate list

Parameters:
    predicate : 'T -> bool
    list : alist<'T>

Returns: aval<bool>

Adaptively checks whether the predicate holds for at least one entry.

predicate : 'T -> bool
list : alist<'T>
Returns: aval<bool>

existsA predicate list

Full Usage: existsA predicate list

Parameters:
    predicate : 'T -> aval<bool>
    list : alist<'T>

Returns: aval<bool>

Adaptively checks whether the predicate holds for at least one entry.

predicate : 'T -> aval<bool>
list : alist<'T>
Returns: aval<bool>

filter predicate list

Full Usage: filter predicate list

Parameters:
    predicate : 'T -> bool
    list : alist<'T>

Returns: alist<'T>

Adaptively filters the list using the given predicate.

predicate : 'T -> bool
list : alist<'T>
Returns: alist<'T>

filterA predicate list

Full Usage: filterA predicate list

Parameters:
    predicate : 'T -> aval<bool>
    list : alist<'T>

Returns: alist<'T>

Adaptively filters the list using the given predicate.

predicate : 'T -> aval<bool>
list : alist<'T>
Returns: alist<'T>

filterAi predicate list

Full Usage: filterAi predicate list

Parameters:
Returns: alist<'T>

Adaptively filters the list using the given predicate.

predicate : Index -> 'T -> aval<bool>
list : alist<'T>
Returns: alist<'T>

filteri predicate list

Full Usage: filteri predicate list

Parameters:
    predicate : Index -> 'T -> bool
    list : alist<'T>

Returns: alist<'T>

Adaptively filters the list using the given predicate.

predicate : Index -> 'T -> bool
list : alist<'T>
Returns: alist<'T>

fold add zero list

Full Usage: fold add zero list

Parameters:
    add : 'S -> 'A -> 'S
    zero : 'S
    list : alist<'A>

Returns: aval<'S>

Adaptively folds over the list using add for additions and recomputes the value on every removal. Note that the order of elements given to add is undefined.

add : 'S -> 'A -> 'S
zero : 'S
list : alist<'A>
Returns: aval<'S>

foldGroup add subtract zero list

Full Usage: foldGroup add subtract zero list

Parameters:
    add : 'S -> 'A -> 'S
    subtract : 'S -> 'A -> 'S
    zero : 'S
    list : alist<'A>

Returns: aval<'S>

Adaptively folds over the list using add for additions and subtract for removals. Note that the order of elements given to add/subtract is undefined.

add : 'S -> 'A -> 'S
subtract : 'S -> 'A -> 'S
zero : 'S
list : alist<'A>
Returns: aval<'S>

foldHalfGroup add trySubtract zero list

Full Usage: foldHalfGroup add trySubtract zero list

Parameters:
    add : 'S -> 'A -> 'S
    trySubtract : 'S -> 'A -> 'S option
    zero : 'S
    list : alist<'A>

Returns: aval<'S>

Adaptively folds over the list using add for additions and trySubtract for removals. Note the trySubtract may return None indicating that the result needs to be recomputed. Also note that the order of elements given to add/trySubtract is undefined.

add : 'S -> 'A -> 'S
trySubtract : 'S -> 'A -> 'S option
zero : 'S
list : alist<'A>
Returns: aval<'S>

forall predicate list

Full Usage: forall predicate list

Parameters:
    predicate : 'T -> bool
    list : alist<'T>

Returns: aval<bool>

Adaptively checks whether the predicate holds for all entries.

predicate : 'T -> bool
list : alist<'T>
Returns: aval<bool>

forallA predicate list

Full Usage: forallA predicate list

Parameters:
    predicate : 'T -> aval<bool>
    list : alist<'T>

Returns: aval<bool>

Adaptively checks whether the predicate holds for all entries.

predicate : 'T -> aval<bool>
list : alist<'T>
Returns: aval<bool>

force arg1

Full Usage: force arg1

Parameters:
Returns: IndexList<'T>

Evaluates the given adaptive list and returns its current content. This should not be used inside the adaptive evaluation of other AdaptiveObjects since it does not track dependencies.

arg0 : alist<'T>
Returns: IndexList<'T>

indexed list

Full Usage: indexed list

Parameters:
Returns: alist<Index * 'T>

Adaptively creates an alist with the source-indices.

list : alist<'T>
Returns: alist<Index * 'T>

init length initializer

Full Usage: init length initializer

Parameters:
    length : aval<int>
    initializer : int -> 'T

Returns: alist<'T>

Generate a list of adaptive length using the given intializer

length : aval<int>
initializer : int -> 'T
Returns: alist<'T>

isEmpty arg1

Full Usage: isEmpty arg1

Parameters:
Returns: aval<bool>

Adaptively tests if the list is empty.

arg0 : alist<'T>
Returns: aval<bool>

map mapping list

Full Usage: map mapping list

Parameters:
    mapping : 'T1 -> 'T2
    list : alist<'T1>

Returns: alist<'T2>

Adaptively applies the given mapping function to all elements and returns a new alist containing the results.

mapping : 'T1 -> 'T2
list : alist<'T1>
Returns: alist<'T2>

mapA mapping list

Full Usage: mapA mapping list

Parameters:
    mapping : 'T1 -> aval<'T2>
    list : alist<'T1>

Returns: alist<'T2>

Adaptively applies the given mapping function to all elements and returns a new alist containing the results.

mapping : 'T1 -> aval<'T2>
list : alist<'T1>
Returns: alist<'T2>

mapAi mapping list

Full Usage: mapAi mapping list

Parameters:
Returns: alist<'T2>

Adaptively applies the given mapping function to all elements and returns a new alist containing the results.

mapping : Index -> 'T1 -> aval<'T2>
list : alist<'T1>
Returns: alist<'T2>

mapUse mapping list

Full Usage: mapUse mapping list

Parameters:
    mapping : 'A -> 'B
    list : alist<'A>

Returns: IDisposable * alist<'B>

Adaptively maps over the given list and disposes all removed values while active. Additionally the returned Disposable disposes all currently existing values and clears the resulting list.

mapping : 'A -> 'B
list : alist<'A>
Returns: IDisposable * alist<'B>

mapUsei mapping list

Full Usage: mapUsei mapping list

Parameters:
Returns: IDisposable * alist<'B>

Adaptively maps over the given list and disposes all removed values while active. Additionally the returned Disposable disposes all currently existing values and clears the resulting list.

mapping : Index -> 'A -> 'B
list : alist<'A>
Returns: IDisposable * alist<'B>

mapi mapping list

Full Usage: mapi mapping list

Parameters:
Returns: alist<'T2>

Adaptively applies the given mapping function to all elements and returns a new alist containing the results.

mapping : Index -> 'T1 -> 'T2
list : alist<'T1>
Returns: alist<'T2>

ofAVal value

Full Usage: ofAVal value

Parameters:
Returns: alist<'T>

Creates an alist from the given adaptive content

value : aval<'a>
Returns: alist<'T>

ofArray elements

Full Usage: ofArray elements

Parameters:
    elements : 'T[]

Returns: alist<'T>

Creates an alist holding the given values.

elements : 'T[]
Returns: alist<'T>

ofIndexList elements

Full Usage: ofIndexList elements

Parameters:
Returns: alist<'T>

Creates an alist holding the given values. `O(1)`

elements : IndexList<'T>
Returns: alist<'T>

ofList elements

Full Usage: ofList elements

Parameters:
    elements : 'T list

Returns: alist<'T>

Creates an alist holding the given values.

elements : 'T list
Returns: alist<'T>

ofReader create

Full Usage: ofReader create

Parameters:
    create : unit -> 'a

Returns: alist<'T>

Creates an alist using the given reader-creator.

create : unit -> 'a
Returns: alist<'T>

ofSeq elements

Full Usage: ofSeq elements

Parameters:
    elements : 'T seq

Returns: alist<'T>

Creates an alist holding the given values.

elements : 'T seq
Returns: alist<'T>

pairwise list

Full Usage: pairwise list

Parameters:
Returns: alist<'T * 'T>

Returns a list containing all elements tupled with their successor.

list : alist<'T>
Returns: alist<'T * 'T>

pairwiseCyclic list

Full Usage: pairwiseCyclic list

Parameters:
Returns: alist<'T * 'T>

Returns a list of each element tupled with its successor and the last element tupled with the first.

list : alist<'T>
Returns: alist<'T * 'T>

range lowerBound upperBound

Full Usage: range lowerBound upperBound

Parameters:
    lowerBound : aval<^T>
    upperBound : aval<^T>

Returns: alist<^T>
Modifiers: inline
Type parameters: ^T

Generate an adaptive range of items based on lower/upper bound

lowerBound : aval<^T>
upperBound : aval<^T>
Returns: alist<^T>

reduce reduction list

Full Usage: reduce reduction list

Parameters:
Returns: aval<'Value>

Reduces the list using the given `AdaptiveReduction` and returns the resulting adaptive value.

reduction : AdaptiveReduction<'T, 'State, 'Value>
list : alist<'T>
Returns: aval<'Value>

reduceBy reduction mapping list

Full Usage: reduceBy reduction mapping list

Parameters:
Returns: aval<'Value>

Applies the mapping function to all elements of the list and reduces the results using the given `AdaptiveReduction`. Returns the resulting adaptive value.

reduction : AdaptiveReduction<'T2, 'State, 'Value>
mapping : Index -> 'T1 -> 'T2
list : alist<'T1>
Returns: aval<'Value>

reduceByA reduction mapping list

Full Usage: reduceByA reduction mapping list

Parameters:
Returns: aval<'Value>

Applies the mapping function to all elements of the list and reduces the results using the given `AdaptiveReduction`. Returns the resulting adaptive value.

reduction : AdaptiveReduction<'T2, 'State, 'Value>
mapping : Index -> 'T1 -> aval<'T2>
list : alist<'T1>
Returns: aval<'Value>

rev list

Full Usage: rev list

Parameters:
Returns: alist<'T>

Adaptively reverses the list

list : alist<'T>
Returns: alist<'T>

single value

Full Usage: single value

Parameters:
    value : 'T

Returns: alist<'T>

A constant alist holding a single value.

value : 'T
Returns: alist<'T>

skip count arg2

Full Usage: skip count arg2

Parameters:
    count : int
    arg1 : alist<'T>

Returns: alist<'T>

adaptively skips `count` elements

count : int
arg1 : alist<'T>
Returns: alist<'T>

skipA count arg2

Full Usage: skipA count arg2

Parameters:
Returns: alist<'T>

adaptively skips `count` elements

count : aval<int>
arg1 : alist<'T>
Returns: alist<'T>

sort list

Full Usage: sort list

Parameters:
Returns: alist<'T>
Modifiers: inline
Type parameters: 'T

Sorts the list.

list : alist<'T>
Returns: alist<'T>

sortBy mapping list

Full Usage: sortBy mapping list

Parameters:
    mapping : 'T1 -> 'T2
    list : alist<'T1>

Returns: alist<'T1>

Sorts the list using the keys given by projection. Note that the sorting is stable.

mapping : 'T1 -> 'T2
list : alist<'T1>
Returns: alist<'T1>

sortByDescending mapping list

Full Usage: sortByDescending mapping list

Parameters:
    mapping : 'T1 -> 'T2
    list : alist<'T1>

Returns: alist<'T1>

Sorts the list using the keys given by projection in descending order. Note that the sorting is stable.

mapping : 'T1 -> 'T2
list : alist<'T1>
Returns: alist<'T1>

sortByDescendingi mapping list

Full Usage: sortByDescendingi mapping list

Parameters:
Returns: alist<'T1>

Sorts the list using the keys given by projection in descending order. Note that the sorting is stable.

mapping : Index -> 'T1 -> 'T2
list : alist<'T1>
Returns: alist<'T1>

sortByi mapping list

Full Usage: sortByi mapping list

Parameters:
Returns: alist<'T1>

Sorts the list using the keys given by projection. Note that the sorting is stable.

mapping : Index -> 'T1 -> 'T2
list : alist<'T1>
Returns: alist<'T1>

sortDescending list

Full Usage: sortDescending list

Parameters:
Returns: alist<'T>
Modifiers: inline
Type parameters: 'T

Sorts the list in descending order.

list : alist<'T>
Returns: alist<'T>

sortWith compare list

Full Usage: sortWith compare list

Parameters:
    compare : 'T -> 'T -> int
    list : alist<'T>

Returns: alist<'T>

Sorts the list using the given compare function. Note that the sorting is stable.

compare : 'T -> 'T -> int
list : alist<'T>
Returns: alist<'T>

sub offset count arg3

Full Usage: sub offset count arg3

Parameters:
    offset : int
    count : int
    arg2 : alist<'T>

Returns: alist<'T>

adaptively skips `offset` elements and takes `count`

offset : int
count : int
arg2 : alist<'T>
Returns: alist<'T>

subA offset count arg3

Full Usage: subA offset count arg3

Parameters:
Returns: alist<'T>

adaptively skips `offset` elements and takes `count`

offset : aval<int>
count : aval<int>
arg2 : alist<'T>
Returns: alist<'T>

sum list

Full Usage: sum list

Parameters:
Returns: aval<^S>
Modifiers: inline
Type parameters: ^T, ^S

Adaptively computes the sum of all entries in the list.

list : alist<^T>
Returns: aval<^S>

sumBy mapping list

Full Usage: sumBy mapping list

Parameters:
    mapping : 'T1 -> ^T2
    list : alist<'T1>

Returns: aval<^S>
Modifiers: inline
Type parameters: 'T1, ^T2, ^S

Adaptively computes the sum of all values returned by mapping for the list.

mapping : 'T1 -> ^T2
list : alist<'T1>
Returns: aval<^S>

sumByA mapping list

Full Usage: sumByA mapping list

Parameters:
    mapping : 'T1 -> aval<^T2>
    list : alist<'T1>

Returns: aval<^S>
Modifiers: inline
Type parameters: 'T1, ^T2, ^S

Adaptively computes the sum of all values returned by mapping for the list.

mapping : 'T1 -> aval<^T2>
list : alist<'T1>
Returns: aval<^S>

take count arg2

Full Usage: take count arg2

Parameters:
    count : int
    arg1 : alist<'T>

Returns: alist<'T>

adaptively takes `count` elements

count : int
arg1 : alist<'T>
Returns: alist<'T>

takeA count arg2

Full Usage: takeA count arg2

Parameters:
Returns: alist<'T>

adaptively takes `count` elements

count : aval<int>
arg1 : alist<'T>
Returns: alist<'T>

toAVal list

Full Usage: toAVal list

Parameters:
Returns: aval<IndexList<'T>>

Creates an aval providing access to the current content of the list.

list : alist<'T>
Returns: aval<IndexList<'T>>

tryAt index list

Full Usage: tryAt index list

Parameters:
    index : int
    list : alist<'T>

Returns: aval<'T option>

Tries to get the element at a specific position from the list. Note that this operation should not be used extensively since its resulting aval will be re-evaluated upon every change of the list.

index : int
list : alist<'T>
Returns: aval<'T option>

tryFirst list

Full Usage: tryFirst list

Parameters:
Returns: aval<'T option>

Tries to get the first element from the list.

list : alist<'T>
Returns: aval<'T option>

tryGet index list

Full Usage: tryGet index list

Parameters:
Returns: aval<'T option>

Tries to get the element associated to a specific Index from the list. Note that this operation should not be used extensively since its resulting aval will be re-evaluated upon every change of the list.

index : Index
list : alist<'T>
Returns: aval<'T option>

tryLast list

Full Usage: tryLast list

Parameters:
Returns: aval<'T option>

Tries to get the last element from the list.

list : alist<'T>
Returns: aval<'T option>

tryMax list

Full Usage: tryMax list

Parameters:
Returns: aval<'T option>
Modifiers: inline
Type parameters: 'T

Adaptively tries to find the largest element.

list : alist<'T>
Returns: aval<'T option>

tryMin list

Full Usage: tryMin list

Parameters:
Returns: aval<'T option>
Modifiers: inline
Type parameters: 'T

Adaptively tries to find the smallest element.

list : alist<'T>
Returns: aval<'T option>

Type something to start searching.