AList Module
Operations on adaptive lists (docs/ALIST-DESIGN.md ยง4).
Functions and values
| Function or value |
Description
|
|
|
Full Usage:
average list
Parameters:
alist<^T>
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)) |
|
Full Usage:
averageBy mapping list
Parameters:
'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)) |
|
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 maps over the given value and returns the resulting list
(FDA
|
|
Adaptively maps over the two values and returns the resulting list
(FDA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
concat lists
Parameters:
'a
Returns: alist<'T>
Modifiers: inline Type parameters: 'a, 'T (requires :> Mibo.Adaptive.alist<'T> Microsoft.FSharp.Collections.seq) |
|
Full Usage:
constant create
Parameters:
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).
|
|
|
|
|
|
|
Full Usage:
custom compute
Parameters:
IReadOnlyList<'T> -> ListDeltaBuilder<'T> -> unit
Returns: alist<'T>
Modifiers: inline Type parameters: 'T (requires equality) |
An adaptive list driven by a compute function (FDA
Example
val mutable offset: int
Multiple items
val list: obj -------------------- type 'T list = List<'T> |
Full Usage:
delay create
Parameters:
unit -> ResizeArray<'T>
Returns: alist<'T>
Modifiers: inline Type parameters: 'T |
|
An empty adaptive list (FDA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
force list
Parameters:
alist<'T>
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
|
Full Usage:
getValue list
Parameters:
alist<'T>
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.
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
mapUse mapping list
Parameters:
'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
|
Full Usage:
mapUsei mapping list
Parameters:
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
|
|
|
|
|
|
|
|
|
Full Usage:
ofArray items
Parameters:
'T[]
Returns: alist<'T>
Modifiers: inline Type parameters: 'T |
|
Full Usage:
ofExternal snapshot
Parameters:
unit -> IReadOnlyList<'T>
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
Example
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
|
Full Usage:
ofList items
Parameters:
'T list
Returns: alist<'T>
Modifiers: inline Type parameters: 'T |
|
Full Usage:
ofResizeArray items
Parameters:
ResizeArray<'T>
Returns: alist<'T>
Modifiers: inline Type parameters: 'T |
|
Full Usage:
ofSeq items
Parameters:
'T seq
Returns: alist<'T>
Modifiers: inline Type parameters: 'T |
|
|
|
|
|
|
|
Full Usage:
reduce reduction list
Parameters:
AdaptiveReduction<'a, 's, 'v>
list : alist<'a>
Returns: aval<'v>
Modifiers: inline Type parameters: 'a, 's, 'v |
Adaptively reduces the list with the given AdaptiveReduction
(FDA
|
Full Usage:
reduceBy reduction mapping list
Parameters:
AdaptiveReduction<'b, 's, 'v>
mapping : 'a -> 'b
list : alist<'a>
Returns: aval<'v>
Modifiers: inline Type parameters: 'b, 's, 'v, 'a |
Maps every element, then reduces the mapped values with the given
AdaptiveReduction (FDA
|
Full Usage:
reduceByA reduction mapping list
Parameters:
AdaptiveReduction<'U, 's, 'v>
mapping : 'T -> aval<'U>
list : alist<'T>
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
|
Full Usage:
single value
Parameters:
'T
Returns: alist<'T>
Modifiers: inline Type parameters: 'T |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
toArray list
Parameters:
alist<'T>
Returns: 'T[]
Modifiers: inline Type parameters: 'T |
|
|
|
Full Usage:
toList list
Parameters:
alist<'T>
Returns: 'T list
Modifiers: inline Type parameters: 'T |
|
|
Adaptively looks up the element at the given position (FDA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mibo