Logo Mibo

ASet Module

Operations on adaptive sets.

Functions and values

Function or value Description

average set

Full Usage: average set

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) and equality)

Adaptively averages the elements (needs a numeric type with DivideByInt, e.g. float). The average is sum/count.

set : aset<^T>
Returns: aval<^T>

averageBy mapping set

Full Usage: averageBy mapping set

Parameters:
    mapping : 'T -> ^U
    set : aset<'T>

Returns: aval<^U>
Modifiers: inline
Type parameters: 'T, ^U (requires equality and (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) and equality)

Adaptively averages the mapped elements (needs a numeric type with DivideByInt, e.g. float).

mapping : 'T -> ^U
set : aset<'T>
Returns: aval<^U>

averageByA mapping set

Full Usage: averageByA mapping set

Parameters:
    mapping : 'T -> aval<^U>
    set : aset<'T>

Returns: aval<^U>
Modifiers: inline
Type parameters: 'T, ^U (requires equality and (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) and equality)

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

mapping : 'T -> aval<^U>
set : aset<'T>
Returns: aval<^U>

bind mapping value

Full Usage: bind mapping value

Parameters:
    mapping : 'T -> aset<'U>
    value : aval<'T>

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

Adaptively maps over the given value and returns the resulting set (FDA ASet.bind parity; PLAN.md Section 7.4). When the value changes, the whole inner set is swapped: the old content is removed, the inner sink is unregistered eagerly, and mapping selects the new inner set. The inner set's own changes propagate while it is bound.

mapping : 'T -> aset<'U>
value : aval<'T>
Returns: aset<'U>
Example

 // a set that follows the currently selected bucket
 let selected = CVal.create 0
 let buckets = [| CSet.empty<int>; CSet.empty<int> |]
 let visible = ASet.bind (fun i -> buckets[i]) (CVal.value selected)
 CSet.add 7 (buckets[0])
 CVal.setValue 1 selected
 // visible is now empty (bucket 1), and bucket 0's later changes do not leak
val selected: obj
val buckets: obj array
Multiple items
val int: value: 'T -> int (requires member op_Explicit)

--------------------
type int = int32

--------------------
type int<'Measure> = int
val visible: obj

bind2 mapping a b

Full Usage: bind2 mapping a b

Parameters:
Returns: aset<'C>
Modifiers: inline
Type parameters: 'A, 'B, 'C (requires equality)

Adaptively maps over the two values and returns the resulting set (FDA ASet.bind2 parity). When either value changes, the whole inner set is swapped (the bind semantics). Composed as one bind over the mapped pair (the FDA approach: nested binds would miss the inner bind's swap, which signals by version only, not by delta).

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

bind3 mapping a b c

Full Usage: bind3 mapping a b c

Parameters:
Returns: aset<'D>
Modifiers: inline
Type parameters: 'A, 'B, 'C, 'D (requires equality)

Adaptively maps over the three values and returns the resulting set (FDA ASet.bind3 parity). When any value changes, the whole inner set is swapped (the bind semantics).

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

choose f set

Full Usage: choose f set

Parameters:
    f : 'T -> 'U option
    set : aset<'T>

Returns: aset<'U>
Modifiers: inline
Type parameters: 'T, 'U (requires equality and equality)

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

f : 'T -> 'U option
set : aset<'T>
Returns: aset<'U>

chooseA mapping set

Full Usage: chooseA mapping set

Parameters:
    mapping : 'T -> aval<'U option>
    set : aset<'T>

Returns: aset<'U>
Modifiers: inline
Type parameters: 'T, 'U (requires equality and equality)

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

mapping : 'T -> aval<'U option>
set : aset<'T>
Returns: aset<'U>

chooseAV mapping set

Full Usage: chooseAV mapping set

Parameters:
    mapping : 'T -> aval<'U voption>
    set : aset<'T>

Returns: aset<'U>
Modifiers: inline
Type parameters: 'T, 'U (requires equality and equality)

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>
set : aset<'T>
Returns: aset<'U>

chooseV f set

Full Usage: chooseV f set

Parameters:
    f : 'T -> 'U voption
    set : aset<'T>

Returns: aset<'U>
Modifiers: inline
Type parameters: 'T, 'U (requires equality and equality)

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

f : 'T -> 'U voption
set : aset<'T>
Returns: aset<'U>

collect mapping set

Full Usage: collect mapping set

Parameters:
    mapping : 'T -> aset<'U>
    set : aset<'T>

Returns: aset<'U>
Modifiers: inline
Type parameters: 'T, 'U (requires equality and equality)

Adaptively maps over the given set and unions all resulting sets (FDA ASet.collect parity; PLAN.md Section 7.4). The output is the refcounted union: an element contributed by several inner sets disappears only when the last contributor drops it. This is also the dynamic unionMany: ASet.collect id over IAdaptiveSet<IAdaptiveSet<'T>>.

mapping : 'T -> aset<'U>
set : aset<'T>
Returns: aset<'U>
Example

 // group numbers by parity: the output follows both the outer set and
 // the inner sets.
 let buckets = CSet.empty<int>
 let odds = CSet.empty<int>
 let evens = CSet.empty<int>
 let all = ASet.collect (fun b -> if b % 2 = 0 then evens else odds) (CSet.value buckets)
 CSet.add 1 buckets
 CSet.add 2 buckets
 CSet.add 3 odds
 // all is now {3}
val buckets: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit)

--------------------
type int = int32

--------------------
type int<'Measure> = int
val odds: obj
val evens: obj
val all: obj

collect' mapping set

Full Usage: collect' mapping set

Parameters:
    mapping : 'T -> 'U seq
    set : aset<'T>

Returns: aset<'U>
Modifiers: inline
Type parameters: 'T, 'U (requires equality and equality)

Flattens the set by statically expanding each element to a sequence (FDA ASet.collect' parity). The expansion runs per source element change; the inner sequences are constant.

mapping : 'T -> 'U seq
set : aset<'T>
Returns: aset<'U>

constant create

Full Usage: constant create

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

An adaptive set whose content is fixed but computed lazily, once, at first read. Enables self-referential definitions (FDA parity: the create function runs at most once).

create : unit -> HashSet<'T>
Returns: aset<'T>

contains value set

Full Usage: contains value set

Parameters:
    value : 'T
    set : aset<'T>

Returns: aval<bool>
Modifiers: inline
Type parameters: 'T (requires equality)

Adaptively tests if the set contains the given element. Per-element precise (O(1) on read) for a direct changeable source: a write to an unrelated element 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 per-element gate runs at the next read's drain).

value : 'T
set : aset<'T>
Returns: aval<bool>

count set

Full Usage: count set

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

Adaptively gets the number of elements. Incremental: maintained per delta, no full rescan.

set : aset<'T>
Returns: aval<int>

countBy predicate set

Full Usage: countBy predicate set

Parameters:
    predicate : 'T -> bool
    set : aset<'T>

Returns: aval<int>
Modifiers: inline
Type parameters: 'T (requires equality)

Adaptively counts the elements that satisfy the predicate.

predicate : 'T -> bool
set : aset<'T>
Returns: aval<int>

countByA predicate set

Full Usage: countByA predicate set

Parameters:
    predicate : 'T -> aval<bool>
    set : aset<'T>

Returns: aval<int>
Modifiers: inline
Type parameters: 'T (requires equality)

Adaptively counts the elements whose predicate aval holds true (FDA ASet.countByA parity). Composition: filterA + count (element-preserving, unlike a bool-mapped reduce).

predicate : 'T -> aval<bool>
set : aset<'T>
Returns: aval<int>

custom compute

Full Usage: custom compute

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

An adaptive set driven by a compute function (FDA ASet.custom parity, 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).

compute : IReadOnlySet<'T> -> SetDeltaBuilder<'T> -> unit
Returns: aset<'T>

delay create

Full Usage: delay create

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

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

create : unit -> HashSet<'T>
Returns: aset<'T>

difference left right

Full Usage: difference left right

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

The elements of the left set that are not in the right set.

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

empty

Full Usage: empty

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

An empty adaptive set (FDA ASet.empty parity).

Returns: aset<'T>

exists predicate set

Full Usage: exists predicate set

Parameters:
    predicate : 'T -> bool
    set : aset<'T>

Returns: aval<bool>
Modifiers: inline
Type parameters: 'T (requires equality)

Adaptively tests if any element satisfies the predicate.

predicate : 'T -> bool
set : aset<'T>
Returns: aval<bool>

existsA predicate set

Full Usage: existsA predicate set

Parameters:
    predicate : 'T -> aval<bool>
    set : aset<'T>

Returns: aval<bool>
Modifiers: inline
Type parameters: 'T (requires equality)

Adaptively tests if any element's predicate aval holds true (FDA ASet.existsA parity).

predicate : 'T -> aval<bool>
set : aset<'T>
Returns: aval<bool>

filter predicate set

Full Usage: filter predicate set

Parameters:
    predicate : 'T -> bool
    set : aset<'T>

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

Keeps the elements that satisfy the predicate.

predicate : 'T -> bool
set : aset<'T>
Returns: aset<'T>

filterA predicate set

Full Usage: filterA predicate set

Parameters:
    predicate : 'T -> aval<bool>
    set : aset<'T>

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

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

predicate : 'T -> aval<bool>
set : aset<'T>
Returns: aset<'T>

fold add zero set

Full Usage: fold add zero set

Parameters:
    add : 's -> 'a -> 's
    zero : 's
    set : aset<'a>

Returns: aval<'s>
Modifiers: inline
Type parameters: 's, 'a (requires equality)

Adaptively folds the set with add; every removal recomputes the whole fold (the fold operation is not invertible in general). Use foldGroup when the operation has an inverse.

add : 's -> 'a -> 's
zero : 's
set : aset<'a>
Returns: aval<'s>

foldGroup add subtract zero set

Full Usage: foldGroup add subtract zero set

Parameters:
    add : 's -> 'a -> 's
    subtract : 's -> 'a -> 's
    zero : 's
    set : aset<'a>

Returns: aval<'s>
Modifiers: inline
Type parameters: 's, 'a (requires equality)

Adaptively folds the set with an invertible subtract: removals update the state without a recompute.

add : 's -> 'a -> 's
subtract : 's -> 'a -> 's
zero : 's
set : aset<'a>
Returns: aval<'s>

foldHalfGroup add trySubtract zero set

Full Usage: foldHalfGroup add trySubtract zero set

Parameters:
    add : 's -> 'a -> 's
    trySubtract : 's -> 'a -> 's voption
    zero : 's
    set : aset<'a>

Returns: aval<'s>
Modifiers: inline
Type parameters: 's, 'a (requires equality)

Adaptively folds the set; a removal applies trySubtract when it returns a value, otherwise the whole fold recomputes.

add : 's -> 'a -> 's
trySubtract : 's -> 'a -> 's voption
zero : 's
set : aset<'a>
Returns: aval<'s>

forall predicate set

Full Usage: forall predicate set

Parameters:
    predicate : 'T -> bool
    set : aset<'T>

Returns: aval<bool>
Modifiers: inline
Type parameters: 'T (requires equality)

Adaptively tests if every element satisfies the predicate.

predicate : 'T -> bool
set : aset<'T>
Returns: aval<bool>

forallA predicate set

Full Usage: forallA predicate set

Parameters:
    predicate : 'T -> aval<bool>
    set : aset<'T>

Returns: aval<bool>
Modifiers: inline
Type parameters: 'T (requires equality)

Adaptively tests if every element's predicate aval holds true (FDA ASet.forallA parity).

predicate : 'T -> aval<bool>
set : aset<'T>
Returns: aval<bool>

force set

Full Usage: force set

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

Materializes the current state as an immutable FrozenSet<'T>. This is the only collection operation that allocates; the result is safe to retain and the library never touches it again. Runs the pending delta processing (drain) first.

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

getValue set

Full Usage: getValue set

Parameters:
Returns: IReadOnlySet<'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.

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

intersect left right

Full Usage: intersect left right

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

The elements present in both sets.

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

isEmpty set

Full Usage: isEmpty set

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

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

set : aset<'T>
Returns: aval<bool>

map f set

Full Usage: map f set

Parameters:
    f : 'T -> 'U
    set : aset<'T>

Returns: aset<'U>
Modifiers: inline
Type parameters: 'T, 'U (requires equality and equality)

Maps every element of the set.

f : 'T -> 'U
set : aset<'T>
Returns: aset<'U>

mapA mapping set

Full Usage: mapA mapping set

Parameters:
    mapping : 'T -> aval<'U>
    set : aset<'T>

Returns: aset<'U>
Modifiers: inline
Type parameters: 'T, 'U (requires equality and equality)

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

mapping : 'T -> aval<'U>
set : aset<'T>
Returns: aset<'U>

mapUse mapping set

Full Usage: mapUse mapping set

Parameters:
    mapping : 'A -> 'B
    set : aset<'A>

Returns: IDisposable * aset<'B>
Modifiers: inline
Type parameters: 'A, 'B (requires equality and equality and :> System.IDisposable)

Maps every element, disposing the mapped value when its last source occurrence leaves (FDA ASet.mapUse parity). The mapped values are stable (the mapping runs once per source element). Disposing the returned disposable disposes all live mapped values and clears the output set.

mapping : 'A -> 'B
set : aset<'A>
Returns: IDisposable * aset<'B>
Example

 let src = CSet.ofSeq [ 1; 2 ]
 let cleanup, mapped = src |> ASet.mapUse (fun id -> Resource(id))
 CSet.remove 1 src          // the resource for 1 is disposed
 cleanup.Dispose()          // all remaining resources are disposed
val src: obj
val cleanup: obj
val mapped: obj
val id: x: 'T -> 'T

ofAVal value

Full Usage: ofAVal value

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

An adaptive set over an adaptive value of a sequence. Every change of the value replaces the whole state and emits the diff as the delta (FDA ASet.ofAVal parity; the value carries no deltas).

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

ofArray items

Full Usage: ofArray items

Parameters:
    items : 'T[]

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

An adaptive set over a fixed array.

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

ofExternal snapshot

Full Usage: ofExternal snapshot

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

Creates an adaptive set from an external snapshot function and an invalidate handle (FDA ASet.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; 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 -> IReadOnlySet<'T>
Returns: aset<'T> * (unit -> unit)
Example

 let mutable current = HashSet [ 1; 2; 3 ]
 let set, invalidate = ASet.ofExternal (fun () -> current :> IReadOnlySet<_>)
 current <- HashSet [ 1; 3 ]
 invalidate ()
 let forced = ASet.force set   // { 1; 3 }
val mutable current: obj
val set: obj
val invalidate: (unit -> obj)
val forced: obj

ofHashSet items

Full Usage: ofHashSet items

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

An adaptive set over a fixed HashSet.

items : HashSet<'T>
Returns: aset<'T>

ofList items

Full Usage: ofList items

Parameters:
    items : 'T list

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

An adaptive set over a fixed list.

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

ofReader reader

Full Usage: ofReader reader

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

An adaptive set over an external reader function. The reader is called on every read (poll); the node diffs the result against its state and emits the diff as the delta. Pull-based: nothing tells this node when the underlying data changes, so consumers must re-read it (FDA ASet.ofReader is pull-based too).

reader : unit -> HashSet<'T>
Returns: aset<'T>

ofSeq items

Full Usage: ofSeq items

Parameters:
    items : 'T seq

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

An adaptive set over fixed, immutable items.

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

range min max

Full Usage: range min max

Parameters:
Returns: aset<^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 (FDA ASet.range parity). The set is rebuilt when either bound changes; the bounds are inclusive.

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

reduce reduction set

Full Usage: reduce reduction set

Parameters:
Returns: aval<'v>
Modifiers: inline
Type parameters: 'a, 's, 'v (requires equality)

Adaptively reduces the set with the given AdaptiveReduction. The state is updated incrementally from deltas: added elements apply add; removed elements apply sub (or recompute the whole state when sub returns ValueNone).

reduction : AdaptiveReduction<'a, 's, 'v>
set : aset<'a>
Returns: aval<'v>

reduceBy reduction mapping set

Full Usage: reduceBy reduction mapping set

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

Maps every element, then reduces the mapped values with the given AdaptiveReduction. The mapping runs per delta element.

reduction : AdaptiveReduction<'b, 's, 'v>
mapping : 'a -> 'b
set : aset<'a>
Returns: aval<'v>

reduceByA reduction mapping set

Full Usage: reduceByA reduction mapping set

Parameters:
Returns: aval<'v>
Modifiers: inline
Type parameters: 'U, 's, 'v, 'T (requires equality and equality)

Adaptively reduces the set after mapping every element to an adaptive value (FDA ASet.reduceByA parity). The mapped values must be equality-comparable (the mapA node's constraint). Composition: the mapping produces distinct pairs struct (x, v), so duplicate mapped values keep their multiplicity (a plain mapA would deduplicate them); the reduction projects the value side.

reduction : AdaptiveReduction<'U, 's, 'v>
mapping : 'T -> aval<'U>
set : aset<'T>
Returns: aval<'v>

single value

Full Usage: single value

Parameters:
    value : 'T

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

A constant set with a single element.

value : 'T
Returns: aset<'T>

sort set

Full Usage: sort set

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

The sorted set as a list, ascending (gap sheet §10.2, stable).

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

sortBy f set

Full Usage: sortBy f set

Parameters:
    f : 'T -> 'K
    set : aset<'T>

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

The set sorted by the keys given by the projection, as a list (gap sheet §10.2, stable).

f : 'T -> 'K
set : aset<'T>
Returns: alist<'T>

sortByDescending f set

Full Usage: sortByDescending f set

Parameters:
    f : 'T -> 'K
    set : aset<'T>

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

The set sorted by the keys given by the projection, descending (gap sheet §10.2, stable).

f : 'T -> 'K
set : aset<'T>
Returns: alist<'T>

sortDescending set

Full Usage: sortDescending set

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

The sorted set as a list, descending (gap sheet §10.2, stable).

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

sortWith comparer set

Full Usage: sortWith comparer set

Parameters:
    comparer : 'T -> 'T -> int
    set : aset<'T>

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

The sorted set as a list, using the given comparison (gap sheet §10.2, stable, poll node; a sorted set is a list by construction).

comparer : 'T -> 'T -> int
set : aset<'T>
Returns: alist<'T>

sum set

Full Usage: sum set

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) and equality)

Adaptively sums the elements.

set : aset<^T>
Returns: aval<^T>

sumBy mapping set

Full Usage: sumBy mapping set

Parameters:
    mapping : 'T -> ^U
    set : aset<'T>

Returns: aval<^U>
Modifiers: inline
Type parameters: 'T, ^U (requires equality and (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.

mapping : 'T -> ^U
set : aset<'T>
Returns: aval<^U>

sumByA mapping set

Full Usage: sumByA mapping set

Parameters:
    mapping : 'T -> aval<^U>
    set : aset<'T>

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

Adaptively sums the avals mapped from the elements (FDA ASet.sumByA parity).

mapping : 'T -> aval<^U>
set : aset<'T>
Returns: aval<^U>

toAVal set

Full Usage: toAVal set

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

Materializes the set as an adaptive value. Every change materializes a new immutable FrozenSet<'T> (the retain boundary, like force); the value is safe to retain.

set : aset<'T>
Returns: aval<FrozenSet<'T>>

toSet set

Full Usage: toSet set

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

Materializes the F# Set counterpart (sorted, structural equality).

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

tryMax set

Full Usage: tryMax set

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

Adaptively gets the maximum element, or ValueNone when empty.

set : aset<'T>
Returns: aval<'T voption>

tryMaxA mapping set

Full Usage: tryMaxA mapping set

Parameters:
    mapping : 'T -> aval<'U>
    set : aset<'T>

Returns: aval<'U voption>
Modifiers: inline
Type parameters: 'T, 'U (requires equality and 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>
set : aset<'T>
Returns: aval<'U voption>

tryMin set

Full Usage: tryMin set

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

Adaptively gets the minimum element, or ValueNone when empty.

set : aset<'T>
Returns: aval<'T voption>

tryMinA mapping set

Full Usage: tryMinA mapping set

Parameters:
    mapping : 'T -> aval<'U>
    set : aset<'T>

Returns: aval<'U voption>
Modifiers: inline
Type parameters: 'T, 'U (requires equality and 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>
set : aset<'T>
Returns: aval<'U voption>

union left right

Full Usage: union left right

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

The union of two sets.

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

unionMany sets

Full Usage: unionMany sets

Parameters:
    sets : aset<'T> seq

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

The union of all given sets. Deviation from FDA: FDA's unionMany takes an adaptive set of sets (the dynamic form lands with bind/collect, PLAN.md 7.4); this overload takes a static sequence and folds union.

sets : aset<'T> seq
Returns: aset<'T>

xor left right

Full Usage: xor left right

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

The symmetric difference: elements present in exactly one set.

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

Type something to start searching.