Logo Mibo

CList Module

Operations on changeable lists.

Functions and values

Function or value Description

addRange items list

Full Usage: addRange items list

Parameters:
    items : 'T seq
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Appends all the given elements (FDA clist.AddRange parity; one atomic batch).

items : 'T seq
list : clist<'T>

append value list

Full Usage: append value list

Parameters:
    value : 'T
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Appends an element at the end of the list.

value : 'T
list : clist<'T>

clear list

Full Usage: clear list

Parameters:
Modifiers: inline
Type parameters: 'T

Removes all elements.

list : clist<'T>

empty

Full Usage: empty

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

An empty changeable list.

Returns: clist<'T>

force list

Full Usage: force list

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

Materializes the current state as an immutable array snapshot.

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

insertAt position value list

Full Usage: insertAt position value list

Parameters:
    position : int
    value : 'T
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Inserts an element before the element currently at the position.

position : int
value : 'T
list : clist<'T>

ofArray items

Full Usage: ofArray items

Parameters:
    items : 'T[]

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

A changeable list with the given items.

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

ofList items

Full Usage: ofList items

Parameters:
    items : 'T list

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

A changeable list with the given items.

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

ofSeq items

Full Usage: ofSeq items

Parameters:
    items : 'T seq

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

A changeable list with the given items.

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

perform delta list

Full Usage: perform delta list

Parameters:
Type parameters: 'T

Applies a batch of list operations (FDA clist.Perform parity). The operations are positional and applied in order; the batch is atomic (sinks receive one delta).

delta : ListDeltaBuilder<'T>
list : clist<'T>

postAppend value list

Full Usage: postAppend value list

Parameters:
    value : 'T
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Posts an append (the cval.Post handoff pattern): queues the operation and returns immediately. Safe from any thread. The owner thread applies the queued operations at the next graph operation (reads and writes auto-drain) or at Posting.pump, as one batch: one delta, one notification delivery. A burst is coalesced into a single handoff. The positions of the batch refer to the state built by its earlier ops and are validated when the batch applies.

value : 'T
list : clist<'T>
Example

 // worker thread
 CList.postAppend item items
 // owner thread: the next read applies the post automatically
 let view = AList.force items
val view: obj

postClear list

Full Usage: postClear list

Parameters:
Modifiers: inline
Type parameters: 'T

Posts a clear. Safe from any thread. See postAppend for the application contract.

list : clist<'T>

postInsertAt position value list

Full Usage: postInsertAt position value list

Parameters:
    position : int
    value : 'T
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Posts an insert before the element currently at the position. Safe from any thread. See postAppend for the application contract.

position : int
value : 'T
list : clist<'T>

postPrepend value list

Full Usage: postPrepend value list

Parameters:
    value : 'T
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Posts an insert at the start. Safe from any thread. See postAppend for the application contract.

value : 'T
list : clist<'T>

postRemove value list

Full Usage: postRemove value list

Parameters:
    value : 'T
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Posts a remove of the first occurrence of the value. Safe from any thread. See postAppend for the application contract.

value : 'T
list : clist<'T>

postRemoveAt position list

Full Usage: postRemoveAt position list

Parameters:
    position : int
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Posts a remove at the position. Safe from any thread. See postAppend for the application contract.

position : int
list : clist<'T>

postSet values list

Full Usage: postSet values list

Parameters:
    values : 'T seq
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Posts a full replace. Safe from any thread. See postAppend for the application contract; a posted replace supersedes the other ops of the same pending batch (the transaction semantics of set).

values : 'T seq
list : clist<'T>

postUpdateAt position value list

Full Usage: postUpdateAt position value list

Parameters:
    position : int
    value : 'T
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Posts a replace at the position. Safe from any thread. See postAppend for the application contract.

position : int
value : 'T
list : clist<'T>

prepend value list

Full Usage: prepend value list

Parameters:
    value : 'T
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Inserts an element at the start of the list.

value : 'T
list : clist<'T>

remove value list

Full Usage: remove value list

Parameters:
    value : 'T
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Removes the first occurrence of the value. No-op when absent.

value : 'T
list : clist<'T>

removeAt position list

Full Usage: removeAt position list

Parameters:
    position : int
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Removes the element currently at the position.

position : int
list : clist<'T>

set values list

Full Usage: set values list

Parameters:
    values : 'T seq
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Replaces the whole list. Last-wins over the whole batch inside a transaction.

values : 'T seq
list : clist<'T>

toList list

Full Usage: toList list

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

Materializes the F# list counterpart.

list : clist<'T>
Returns: 'T list

updateAt position value list

Full Usage: updateAt position value list

Parameters:
    position : int
    value : 'T
    list : clist<'T>

Modifiers: inline
Type parameters: 'T

Replaces the element currently at the position.

position : int
value : 'T
list : clist<'T>

updateTo target list

Full Usage: updateTo target list

Parameters:
    target : 'T[]
    list : clist<'T>

Returns: bool
Modifiers: inline
Type parameters: 'T

Replaces the whole list and returns whether the content changed (FDA clist.UpdateTo parity). An equal target marks nothing.

target : 'T[]
list : clist<'T>
Returns: bool

value list

Full Usage: value list

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

Views the changeable list as an adaptive list.

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

Type something to start searching.