Header menu logo FSharp.Data.Adaptive

AdaptiveReduction<'a, 's, 'v> Type

AdaptiveReduction holds operators for reducing collections adaptively. Its main purpose is to simplify reductions on ASet/AMap/AList.

Record fields

Record Field Description

add

Full Usage: add

Field type: 's -> 'a -> 's

Addition function used to add new elements

Field type: 's -> 'a -> 's

seed

Full Usage: seed

Field type: 's

The seed value for the reduction

Field type: 's

sub

Full Usage: sub

Field type: 's -> 'a -> ValueOption<'s>

Subtraction function used when elements are removed. Note that it may return ValueNone in cases where the value can't be subtracted. However when doing so, the reduce implementations will fall back to recomputing the result from scratch.

Field type: 's -> 'a -> ValueOption<'s>

view

Full Usage: view

Field type: 's -> 'v

The view function allows the result to be mapped to some other type. Note that reduce implementations internally assume that this is a very cheap conversion.

Field type: 's -> 'v

Type something to start searching.