Logo Mibo

AList Module

Operations on adaptive lists (docs/ALIST-DESIGN.md ยง4).

Functions and values

Function or value Description

append left right

Full Usage: append left right

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

The concatenation of two lists (FDA AList.append parity).

left : alist<'T>
right : alist<'T>
Returns: alist<'T>

average list

Full Usage: average list

Parameters:
Returns: aval<^T>
Modifiers: inline
Type parameters: ^T (requires (static member DivideByInt : ^T * Microsoft.FSharp.Core.int -> ^T) and (static member get_Zero : -> ^T) and (static member op_Addition : ^T * ^T -> ^T) and (static member op_Subtraction : ^T * ^T -> ^T))

Adaptively averages the elements (needs a numeric type with DivideByInt, e.g. float; FDA AList.average parity).

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

averageBy mapping list

Full Usage: averageBy mapping list

Parameters:
    mapping : 'T -> ^U
    list : alist<'T>

Returns: aval<^U>
Modifiers: inline
Type parameters: 'T, ^U (requires (static member DivideByInt : ^U * Microsoft.FSharp.Core.int -> ^U) and (static member get_Zero : -> ^U) and (static member op_Addition : ^U * ^U -> ^U) and (static member op_Subtraction : ^U * ^U -> ^U))

Adaptively averages the mapped elements (needs a numeric type with DivideByInt, e.g. float; FDA AList.averageBy parity).

mapping : 'T -> ^U
list : alist<'T>
Returns: aval<^U>

averageByA mapping list

Full Usage: averageByA mapping list

Parameters:
Returns: aval<^U>
Modifiers: inline
Type parameters: 'T, ^U (requires (static member DivideByInt : ^U * Microsoft.FSharp.Core.int -> ^U) and (static member get_Zero : -> ^U) and (static member op_Addition : ^U * ^U -> ^U) and (static member op_Subtraction : ^U * ^U -> ^U))

Adaptively averages the avals mapped from the elements (needs a numeric type with DivideByInt, e.g. float; the AList counterpart of ASet.averageByA).

mapping : 'T -> aval<^U>
list : alist<'T>
Returns: aval<^U>

bind mapping value

Full Usage: bind mapping value

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

Adaptively maps over the given value and returns the resulting list (FDA AList.bind parity). When the value changes, mapping selects the new inner list; the output is rebuilt on any change (the value's or the inner list's), emitting the positional diff.

mapping : 'T -> alist<'U>
value : aval<'T>
Returns: alist<'U>

bind2 mapping a b

Full Usage: bind2 mapping a b

Parameters:
Returns: alist<'C>
Modifiers: inline
Type parameters: 'A, 'B, 'C

Adaptively maps over the two values and returns the resulting list (FDA AList.bind2 parity). Composed as one bind over the mapped pair (the ASet lesson: nested binds miss the inner bind's swap, which signals by version only, not by delta).

mapping : 'A -> 'B -> alist<'C>
a : aval<'A>
b : aval<'B>
Returns: alist<'C>

bind3 mapping a b c

Full Usage: bind3 mapping a b c

Parameters:
Returns: alist<'D>
Modifiers: inline
Type parameters: 'A, 'B, 'C, 'D

Adaptively maps over the three values and returns the resulting list (FDA AList.bind3 parity).

mapping : 'A -> 'B -> 'C -> alist<'D>
a : aval<'A>
b : aval<'B>
c : aval<'C>
Returns: alist<'D>

choose f list

Full Usage: choose f list

Parameters:
    f : 'T -> 'U option
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

Maps every element, keeping only the ones the mapping returns a value for.

f : 'T -> 'U option
list : alist<'T>
Returns: alist<'U>

chooseA mapping list

Full Usage: chooseA mapping list

Parameters:
    mapping : 'T -> aval<'U option>
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

Adaptively maps every element of the list to an adaptive value, keeping only the elements whose aval holds Some (FDA AList.chooseA parity).

mapping : 'T -> aval<'U option>
list : alist<'T>
Returns: alist<'U>

chooseAV mapping list

Full Usage: chooseAV mapping list

Parameters:
    mapping : 'T -> aval<'U voption>
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

The voption counterpart of chooseA: the mapping returns aval<'U voption> directly, without the option-to-voption wrapper node per element (the no-allocation path).

mapping : 'T -> aval<'U voption>
list : alist<'T>
Returns: alist<'U>

chooseV f list

Full Usage: chooseV f list

Parameters:
    f : 'T -> 'U voption
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

Maps every element, keeping only the ones the mapping returns a value for (voption form).

f : 'T -> 'U voption
list : alist<'T>
Returns: alist<'U>

choosei f list

Full Usage: choosei f list

Parameters:
    f : int -> 'T -> 'U option
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

Keeps the entries whose index-aware mapping returns a value (FDA AList.choosei parity).

f : int -> 'T -> 'U option
list : alist<'T>
Returns: alist<'U>

chooseiA mapping list

Full Usage: chooseiA mapping list

Parameters:
    mapping : int -> 'T -> aval<'U option>
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

Adaptively maps every element of the list to an adaptive value, keeping only the elements whose aval holds Some, passing the input position to the mapping (FDA AList.chooseiA parity).

mapping : int -> 'T -> aval<'U option>
list : alist<'T>
Returns: alist<'U>

chooseiAV mapping list

Full Usage: chooseiAV mapping list

Parameters:
    mapping : int -> 'T -> aval<'U voption>
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

The voption counterpart of chooseiA: the mapping returns aval<'U voption> directly, without the option-to-voption wrapper node per element (the no-allocation path).

mapping : int -> 'T -> aval<'U voption>
list : alist<'T>
Returns: alist<'U>

chooseiV f list

Full Usage: chooseiV f list

Parameters:
    f : int -> 'T -> 'U voption
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

Keeps the entries whose index-aware mapping returns a value (the voption counterpart of choosei).

f : int -> 'T -> 'U voption
list : alist<'T>
Returns: alist<'U>

concat lists

Full Usage: concat lists

Parameters:
    lists : 'a

Returns: alist<'T>
Modifiers: inline
Type parameters: 'a, 'T (requires :> Mibo.Adaptive.alist<'T> Microsoft.FSharp.Collections.seq)

Concatenates a fixed sequence of lists (FDA AList.concat parity, poll node; generalizes append).

lists : 'a
Returns: alist<'T>

constant create

Full Usage: constant create

Parameters:
    create : unit -> ResizeArray<'T>

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

An adaptive list whose content is fixed but computed lazily, once, at first read (FDA parity: the create function runs at most once).

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

count list

Full Usage: count list

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

Adaptively gets the number of elements.

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

countBy predicate list

Full Usage: countBy predicate list

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

Returns: aval<int>
Modifiers: inline
Type parameters: 'T

Adaptively counts the elements that satisfy the predicate (FDA AList.countBy parity).

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

countByA predicate list

Full Usage: countByA predicate list

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

Returns: aval<int>
Modifiers: inline
Type parameters: 'T

Adaptively counts the elements whose predicate aval holds true (the AList counterpart of ASet.countByA).

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

custom compute

Full Usage: custom compute

Parameters:
Returns: alist<'T>
Modifiers: inline
Type parameters: 'T (requires equality)

An adaptive list driven by a compute function (FDA AList.custom parity, MAPA-DESIGN §1.3, pull model). The compute receives the current view and a delta builder; it appends the operations that describe the change since the previous call (for example, consuming its own event queue). The operations are positional and applied in order.

compute : IReadOnlyList<'T> -> ListDeltaBuilder<'T> -> unit
Returns: alist<'T>
Example

 let mutable offset = 0
 let list =
     AList.custom (fun view delta ->
         // rebuild the whole view on each poll (the simplest compute)
         if offset <> 0 then
             for i in view.Count - 1 .. -1 .. 0 do
                 delta.Remove i

             for i in 0 .. view.Count - 1 do
                 delta.Insert(i, i + offset)

             offset <- 0)
val mutable offset: int
Multiple items
val list: obj

--------------------
type 'T list = List<'T>

delay create

Full Usage: delay create

Parameters:
    create : unit -> ResizeArray<'T>

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

Alias of constant (FDA parity: delay is constant).

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

empty

Full Usage: empty

Returns: alist<'T>
Type parameters: 'T

An empty adaptive list (FDA AList.empty parity).

Returns: alist<'T>

exists predicate list

Full Usage: exists predicate list

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

Returns: aval<bool>
Modifiers: inline
Type parameters: 'T

Adaptively tests if any element satisfies the predicate (FDA AList.exists parity).

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>
Modifiers: inline
Type parameters: 'T

Adaptively tests if any element's predicate aval holds true (the AList counterpart of ASet.existsA).

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>
Modifiers: inline
Type parameters: 'T

Keeps the elements that satisfy the 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>
Modifiers: inline
Type parameters: 'T

Adaptively keeps the elements whose predicate aval holds true (FDA AList.filterA parity).

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

filteri predicate list

Full Usage: filteri predicate list

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

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

Keeps the elements whose index-aware predicate holds (FDA AList.filteri parity).

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

filteriA predicate list

Full Usage: filteriA predicate list

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

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

Adaptively keeps the elements whose predicate aval holds true, passing the input position to the predicate (FDA AList.filteriA parity).

predicate : int -> 'T -> aval<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>
Modifiers: inline
Type parameters: 's, 'a

Adaptively folds the list with add; every removal recomputes the whole fold (FDA AList.fold parity).

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>
Modifiers: inline
Type parameters: 's, 'a

Adaptively folds the list with an invertible subtract: removals update the state without a recompute (FDA AList.foldGroup parity; the add/sub must be delta-consistent, see reduce).

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 voption
    zero : 's
    list : alist<'a>

Returns: aval<'s>
Modifiers: inline
Type parameters: 's, 'a

Adaptively folds the list with a partially invertible trySubtract: removals that cannot be inverted recompute the whole fold (FDA AList.foldHalfGroup parity).

add : 's -> 'a -> 's
trySubtract : 's -> 'a -> 's voption
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>
Modifiers: inline
Type parameters: 'T

Adaptively tests if every element satisfies the predicate (FDA AList.forall parity).

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>
Modifiers: inline
Type parameters: 'T

Adaptively tests if every element's predicate aval holds true (the AList counterpart of ASet.forallA).

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

force list

Full Usage: force list

Parameters:
Returns: 'T[]
Modifiers: inline
Type parameters: 'T

Materializes the current state as a fresh array. This is the only list operation that allocates; the result is safe to retain and the library never touches it again. Runs the pending delta processing (drain) first. There is no FrozenList in System.Collections.Frozen on net8/net10, so the array is the retain boundary (docs/ALIST-DESIGN.md §3.3).

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

getValue list

Full Usage: getValue list

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

Returns a transient view of the current state. Valid only until the next write on the owner thread; do not retain or mutate it. Use force to materialize a snapshot that is safe to retain.

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

indexed list

Full Usage: indexed list

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

An adaptive list of the elements paired with their input positions (FDA AList.indexed parity; struct pair, the library convention; the position is the int input position).

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

init f count

Full Usage: init f count

Parameters:
    f : int -> 'T
    count : aval<int>

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

An adaptive list generated from a count and a generator (FDA AList.init parity). The list is rebuilt when the count changes.

f : int -> 'T
count : aval<int>
Returns: alist<'T>

isEmpty list

Full Usage: isEmpty list

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

Adaptively tests if the list is empty. Incremental: only a change that crosses the empty/non-empty boundary re-evaluates this value or its dependents.

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

map f list

Full Usage: map f list

Parameters:
    f : 'T -> 'U
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

Maps every element of the list.

f : 'T -> 'U
list : alist<'T>
Returns: alist<'U>

mapA mapping list

Full Usage: mapA mapping list

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

Adaptively maps every element of the list to an adaptive value (FDA AList.mapA parity). The output follows the aval returned for each element; writes to the avals deliver targeted deltas.

mapping : 'T -> aval<'U>
list : alist<'T>
Returns: alist<'U>

mapUse mapping list

Full Usage: mapUse mapping list

Parameters:
    mapping : 'T -> 'W
    list : alist<'T>

Returns: IDisposable * alist<'W>
Modifiers: inline
Type parameters: 'T, 'W (requires equality and :> System.IDisposable)

Maps every element, disposing the mapped value when the element leaves its position (FDA AList.mapUse parity). The output is 1:1 with the input. Disposing the returned disposable disposes all live mapped values and clears the output.

mapping : 'T -> 'W
list : alist<'T>
Returns: IDisposable * alist<'W>

mapUsei mapping list

Full Usage: mapUsei mapping list

Parameters:
    mapping : int -> 'T -> 'W
    list : alist<'T>

Returns: IDisposable * alist<'W>
Modifiers: inline
Type parameters: 'T, 'W (requires equality and :> System.IDisposable)

Maps every element, passing the input position to the mapping and disposing the mapped value when the element leaves its position (FDA AList.mapUsei parity; the index is the int input position, the positional deviation).

mapping : int -> 'T -> 'W
list : alist<'T>
Returns: IDisposable * alist<'W>

mapi f list

Full Usage: mapi f list

Parameters:
    f : int -> 'T -> 'U
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

Maps every element, passing the input position to the mapping (FDA AList.mapi parity; the index is the int input position, the positional deviation per ALIST-DESIGN §5).

f : int -> 'T -> 'U
list : alist<'T>
Returns: alist<'U>

mapiA mapping list

Full Usage: mapiA mapping list

Parameters:
    mapping : int -> 'T -> aval<'U>
    list : alist<'T>

Returns: alist<'U>
Modifiers: inline
Type parameters: 'T, 'U

Adaptively maps every element of the list to an adaptive value, passing the input position to the mapping (FDA AList.mapiA parity; FDA passes an Index, we pass the int position).

mapping : int -> 'T -> aval<'U>
list : alist<'T>
Returns: alist<'U>

ofASet set

Full Usage: ofASet set

Parameters:
Returns: alist<'T>
Modifiers: inline
Type parameters: 'T (requires equality)

An adaptive list of a set's elements (FDA AList.ofASet parity, poll node). The order is the set's iteration order, stable while the set does not change.

set : aset<'T>
Returns: alist<'T>

ofAVal value

Full Usage: ofAVal value

Parameters:
Returns: alist<'T>
Modifiers: inline
Type parameters: 'T, 'S (requires :> 'T Microsoft.FSharp.Collections.seq)

An adaptive list over an adaptive value of a sequence (FDA AList.ofAVal parity). Every change of the value replaces the whole state and emits the positional diff as the delta.

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

ofArray items

Full Usage: ofArray items

Parameters:
    items : 'T[]

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

An adaptive list over a fixed array.

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

ofExternal snapshot

Full Usage: ofExternal snapshot

Parameters:
Returns: alist<'T> * (unit -> unit)
Modifiers: inline
Type parameters: 'T (requires equality)

Creates an adaptive list from an external snapshot function and an invalidate handle (FDA AList.ofExternal parity, MAPA-DESIGN §1.1). The snapshot runs at most once per invalidate, on the next read, and is diffed against the previous snapshot positionally (prefix/suffix, the ChangeableList.ApplyDiff algorithm); not invalidated โ†’ reads are O(1) and allocate nothing. The handle is O(1) to call and thread-safe (a foreign-thread call is posted to the owner context and applied at the next graph operation).

snapshot : unit -> IReadOnlyList<'T>
Returns: alist<'T> * (unit -> unit)
Example

 let mutable current = ResizeArray [ 1; 2; 3 ]
 let list, invalidate = AList.ofExternal (fun () -> current :> IReadOnlyList<_>)
 current.RemoveAt 0
 invalidate ()
 let forced = AList.force list   // [ 2; 3 ]
val mutable current: ResizeArray<int>
type ResizeArray<'T> = System.Collections.Generic.List<'T>
Multiple items
val list: obj

--------------------
type 'T list = List<'T>
val invalidate: (unit -> obj)
System.Collections.Generic.List.RemoveAt(index: int) : unit
val forced: obj

ofList items

Full Usage: ofList items

Parameters:
    items : 'T list

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

An adaptive list over a fixed list.

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

ofResizeArray items

Full Usage: ofResizeArray items

Parameters:
    items : ResizeArray<'T>

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

An adaptive list over a fixed ResizeArray.

items : ResizeArray<'T>
Returns: alist<'T>

ofSeq items

Full Usage: ofSeq items

Parameters:
    items : 'T seq

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

An adaptive list over fixed, immutable items.

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

pairwise list

Full Usage: pairwise list

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

An adaptive list of adjacent pairs (FDA AList.pairwise parity, poll node; struct pairs, the library convention).

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

pairwiseCyclic list

Full Usage: pairwiseCyclic list

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

An adaptive list of adjacent pairs, with the last element paired with the first (FDA AList.pairwiseCyclic parity, poll node).

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

range min max

Full Usage: range min max

Parameters:
Returns: alist<^T>
Modifiers: inline
Type parameters: ^T (requires (static member op_Addition : ^T * ^T -> ^T) and (static member get_One : -> ^T) and comparison)

An adaptive numeric range as a list (FDA AList.range parity). The list is rebuilt when either bound changes; the bounds are inclusive.

min : aval<^T>
max : aval<^T>
Returns: alist<^T>

reduce reduction list

Full Usage: reduce reduction list

Parameters:
Returns: aval<'v>
Modifiers: inline
Type parameters: 'a, 's, 'v

Adaptively reduces the list with the given AdaptiveReduction (FDA AList.reduce parity). The reduction state is maintained per delta; a reduction that cannot invert a removal recomputes (e.g. AdaptiveReduction.fold). Order-sensitive reductions are the caller's contract (the add/sub must be delta-consistent).

reduction : AdaptiveReduction<'a, 's, 'v>
list : alist<'a>
Returns: aval<'v>

reduceBy reduction mapping list

Full Usage: reduceBy reduction mapping list

Parameters:
Returns: aval<'v>
Modifiers: inline
Type parameters: 'b, 's, 'v, 'a

Maps every element, then reduces the mapped values with the given AdaptiveReduction (FDA AList.reduceBy parity). The mapping runs per delta entry.

reduction : AdaptiveReduction<'b, 's, 'v>
mapping : 'a -> 'b
list : alist<'a>
Returns: aval<'v>

reduceByA reduction mapping list

Full Usage: reduceByA reduction mapping list

Parameters:
Returns: aval<'v>
Modifiers: inline
Type parameters: 'U, 's, 'v, 'T

Adaptively reduces the list after mapping every element to an adaptive value (the AList counterpart of ASet.reduceByA). The mapped values keep their multiplicity (a list has no deduplication).

reduction : AdaptiveReduction<'U, 's, 'v>
mapping : 'T -> aval<'U>
list : alist<'T>
Returns: aval<'v>

rev list

Full Usage: rev list

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

Reverses the list (FDA AList.rev parity, poll node).

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

single value

Full Usage: single value

Parameters:
    value : 'T

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

A constant list with a single element.

value : 'T
Returns: alist<'T>

skip count list

Full Usage: skip count list

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

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

All elements after the first count (FDA AList.skip parity).

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

skipA count list

Full Usage: skipA count list

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

All elements after the first count (FDA AList.skipA parity).

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

sort list

Full Usage: sort list

Parameters:
Returns: alist<'T>
Modifiers: inline
Type parameters: 'T (requires comparison)

Sorts the list ascending (FDA AList.sort parity, stable, poll node).

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

sortBy f list

Full Usage: sortBy f list

Parameters:
    f : 'T -> 'K
    list : alist<'T>

Returns: alist<'T>
Modifiers: inline
Type parameters: 'T, 'K (requires comparison)

Sorts the list by the keys given by the projection (FDA AList.sortBy parity, stable, poll node).

f : 'T -> 'K
list : alist<'T>
Returns: alist<'T>

sortByDescending f list

Full Usage: sortByDescending f list

Parameters:
    f : 'T -> 'K
    list : alist<'T>

Returns: alist<'T>
Modifiers: inline
Type parameters: 'T, 'K (requires comparison)

Sorts the list by the keys given by the projection, descending (FDA AList.sortByDescending parity).

f : 'T -> 'K
list : alist<'T>
Returns: alist<'T>

sortByDescendingi f list

Full Usage: sortByDescendingi f list

Parameters:
    f : int -> 'T -> 'K
    list : alist<'T>

Returns: alist<'T>
Modifiers: inline
Type parameters: 'T, 'K (requires comparison)

Sorts the list by the keys given by the projection, descending, index-aware (FDA AList.sortByDescendingi parity).

f : int -> 'T -> 'K
list : alist<'T>
Returns: alist<'T>

sortByi f list

Full Usage: sortByi f list

Parameters:
    f : int -> 'T -> 'K
    list : alist<'T>

Returns: alist<'T>
Modifiers: inline
Type parameters: 'T, 'K (requires comparison)

Sorts the list by the keys given by the projection, passing the input position to the projection (FDA AList.sortByi parity, stable, poll node; the index is the int input position).

f : int -> 'T -> 'K
list : alist<'T>
Returns: alist<'T>

sortDescending list

Full Usage: sortDescending list

Parameters:
Returns: alist<'T>
Modifiers: inline
Type parameters: 'T (requires comparison)

Sorts the list descending (FDA AList.sortDescending parity, stable, poll node).

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

sortWith comparer list

Full Usage: sortWith comparer list

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

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

Sorts the list with the given comparison (FDA AList.sortWith parity, stable, poll node).

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

sub offset count list

Full Usage: sub offset count list

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

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

The window [offset, offset + count) of the list (FDA AList.sub parity).

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

subA offset count list

Full Usage: subA offset count list

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

The window [offset, offset + count) of the list (FDA AList.subA parity, poll node; the bounds are adaptive).

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

sum list

Full Usage: sum list

Parameters:
Returns: aval<^T>
Modifiers: inline
Type parameters: ^T (requires (static member get_Zero : -> ^T) and (static member op_Addition : ^T * ^T -> ^T) and (static member op_Subtraction : ^T * ^T -> ^T))

Adaptively sums the elements (FDA AList.sum parity; needs an additive numeric type).

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

sumBy mapping list

Full Usage: sumBy mapping list

Parameters:
    mapping : 'T -> ^U
    list : alist<'T>

Returns: aval<^U>
Modifiers: inline
Type parameters: 'T, ^U (requires (static member get_Zero : -> ^U) and (static member op_Addition : ^U * ^U -> ^U) and (static member op_Subtraction : ^U * ^U -> ^U))

Adaptively sums the mapped elements (FDA AList.sumBy parity).

mapping : 'T -> ^U
list : alist<'T>
Returns: aval<^U>

sumByA mapping list

Full Usage: sumByA mapping list

Parameters:
Returns: aval<^U>
Modifiers: inline
Type parameters: 'T, ^U (requires (static member get_Zero : -> ^U) and (static member op_Addition : ^U * ^U -> ^U) and (static member op_Subtraction : ^U * ^U -> ^U))

Adaptively sums the avals mapped from the elements (the AList counterpart of ASet.sumByA).

mapping : 'T -> aval<^U>
list : alist<'T>
Returns: aval<^U>

take count list

Full Usage: take count list

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

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

The first count elements (FDA AList.take parity).

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

takeA count list

Full Usage: takeA count list

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

The first count elements (FDA AList.takeA parity).

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

toASet list

Full Usage: toASet list

Parameters:
Returns: aset<'T>
Modifiers: inline
Type parameters: 'T (requires equality)

An adaptive set of the list's elements, deduplicated (FDA AList.toASet parity). An element leaves the output only when its last occurrence leaves.

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

toAVal list

Full Usage: toAVal list

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

Materializes the list as an adaptive value. Every change materializes a new array (the retain boundary, like force); the value is safe to retain (FDA AList.toAVal parity, as aval<'T[]>, the positional deviation).

list : alist<'T>
Returns: aval<'T[]>

toArray list

Full Usage: toArray list

Parameters:
Returns: 'T[]
Modifiers: inline
Type parameters: 'T

Materializes the array counterpart.

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

toIndexedASet list

Full Usage: toIndexedASet list

Parameters:
Returns: aset<int * 'T>
Modifiers: inline
Type parameters: 'T (requires equality)

An adaptive set of the elements paired with their input positions (FDA AList.toIndexedASet parity; struct pairs, the library convention).

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

toList list

Full Usage: toList list

Parameters:
Returns: 'T list
Modifiers: inline
Type parameters: 'T

Materializes the F# list counterpart.

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

tryAt index list

Full Usage: tryAt index list

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

Returns: aval<'T voption>
Modifiers: inline
Type parameters: 'T

Adaptively looks up the element at the given position (FDA AList.tryAt parity; the position is the int input position, the positional deviation). Adaptively looks up the element at the given position (FDA AList.tryAt parity; the position is the int input position, the positional deviation). Per-position precise (O(1) on read) for a direct changeable source: an op that does not touch the position (an insert or remove after it, an update elsewhere) does not re-evaluate this value or its dependents. On a derived source the branch re-evaluates at most once per upstream change (pull-lazy: the gate runs at the next read's drain).

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

tryFirst list

Full Usage: tryFirst list

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

Adaptively gets the first element, or ValueNone when empty (FDA AList.tryFirst parity). Per-position precise, like tryAt.

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

tryGet index list

Full Usage: tryGet index list

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

Returns: aval<'T voption>
Modifiers: inline
Type parameters: 'T

Alias of tryAt (FDA parity name; both take the int position).

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

tryLast list

Full Usage: tryLast list

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

Adaptively gets the last element, or ValueNone when empty (FDA AList.tryLast parity). Per-position precise: only an op that changes the last element (append, remove or update of the last element) re-evaluates this value or its dependents.

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

tryMax list

Full Usage: tryMax list

Parameters:
Returns: aval<'T voption>
Modifiers: inline
Type parameters: 'T (requires comparison)

Adaptively gets the maximum element, or ValueNone when empty (FDA AList.tryMax parity).

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

tryMaxA mapping list

Full Usage: tryMaxA mapping list

Parameters:
Returns: aval<'U voption>
Modifiers: inline
Type parameters: 'T, 'U (requires comparison)

Adaptively gets the maximum of the avals mapped from the elements, or ValueNone when empty (the voption counterpart of the *A family, mirroring tryMax).

mapping : 'T -> aval<'U>
list : alist<'T>
Returns: aval<'U voption>

tryMin list

Full Usage: tryMin list

Parameters:
Returns: aval<'T voption>
Modifiers: inline
Type parameters: 'T (requires comparison)

Adaptively gets the minimum element, or ValueNone when empty (FDA AList.tryMin parity).

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

tryMinA mapping list

Full Usage: tryMinA mapping list

Parameters:
Returns: aval<'U voption>
Modifiers: inline
Type parameters: 'T, 'U (requires comparison)

Adaptively gets the minimum of the avals mapped from the elements, or ValueNone when empty (the voption counterpart of the *A family, mirroring tryMin).

mapping : 'T -> aval<'U>
list : alist<'T>
Returns: aval<'U voption>

Type something to start searching.