Header menu logo FSharp.Data.Adaptive

AVal Module

Operators related to the aval<_> type

Types

Type Description

AbstractVal<'T>

Functions and values

Function or value Description

bind mapping value

Full Usage: bind mapping value

Parameters:
    mapping : 'T1 -> aval<'T2>
    value : aval<'T1>

Returns: aval<'T2>

Returns a new adaptive value that adaptively applies the mapping function to the given input and adaptively depends on the resulting adaptive value. The resulting adaptive value will hold the latest value of the aval<_> returned by mapping.

mapping : 'T1 -> aval<'T2>
value : aval<'T1>
Returns: aval<'T2>

bind2 mapping value1 value2

Full Usage: bind2 mapping value1 value2

Parameters:
    mapping : 'T1 -> 'T2 -> aval<'T3>
    value1 : aval<'T1>
    value2 : aval<'T2>

Returns: aval<'T3>

Adaptively applies the mapping function to the given adaptive values and adaptively depends on the adaptive value returned by mapping. The resulting aval<'T3> will hold the latest value of the aval<_> returned by mapping.

mapping : 'T1 -> 'T2 -> aval<'T3>
value1 : aval<'T1>
value2 : aval<'T2>
Returns: aval<'T3>

bind3 mapping value1 value2 value3

Full Usage: bind3 mapping value1 value2 value3

Parameters:
    mapping : 'T1 -> 'T2 -> 'T3 -> aval<'T4>
    value1 : aval<'T1>
    value2 : aval<'T2>
    value3 : aval<'T3>

Returns: aval<'T4>

Adaptively applies the mapping function to the given adaptive values and adaptively depends on the adaptive value returned by mapping. The resulting aval<'T4> will hold the latest value of the aval<_> returned by mapping.

mapping : 'T1 -> 'T2 -> 'T3 -> aval<'T4>
value1 : aval<'T1>
value2 : aval<'T2>
value3 : aval<'T3>
Returns: aval<'T4>

cast value

Full Usage: cast value

Parameters:
Returns: aval<'T>

Casts the given adaptive value to the specified type. Raises InvalidCastException *immediately* when the specified cast is not valid (similar to Seq.cast).

value : IAdaptiveValue
Returns: aval<'T>

constant value

Full Usage: constant value

Parameters:
    value : 'T

Returns: aval<'T>

Creates a constant adaptive value always holding the given value. The system internally propagates constants.

value : 'T
Returns: aval<'T>

custom compute

Full Usage: custom compute

Parameters:
Returns: aval<'T>

Creates a custom adaptive value using the given computation. Callers are responsible for removing inputs that are no longer needed.

compute : AdaptiveToken -> 'T
Returns: aval<'T>

delay create

Full Usage: delay create

Parameters:
    create : unit -> 'T

Returns: aval<'T>

Creates a constant adaptive value using the given create function. The system internally propagates constants.

create : unit -> 'T
Returns: aval<'T>

force value

Full Usage: force value

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

Evaluates the given adaptive value and returns its current value. This should not be used inside the adaptive evaluation of other AdaptiveObjects since it does not track dependencies.

value : aval<'T>
Returns: 'T

init value

Full Usage: init value

Parameters:
    value : 'T

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

Creates a changeable adaptive value intially holding the given value

value : 'T
Returns: cval<'T>

map mapping value

Full Usage: map mapping value

Parameters:
    mapping : 'T1 -> 'T2
    value : aval<'T1>

Returns: aval<'T2>

Returns a new adaptive value that adaptively applies the mapping function to the given adaptive inputs.

mapping : 'T1 -> 'T2
value : aval<'T1>
Returns: aval<'T2>

map2 mapping value1 value2

Full Usage: map2 mapping value1 value2

Parameters:
    mapping : 'T1 -> 'T2 -> 'T3
    value1 : aval<'T1>
    value2 : aval<'T2>

Returns: aval<'T3>

Returns a new adaptive value that adaptively applies the mapping function to the given adaptive inputs.

mapping : 'T1 -> 'T2 -> 'T3
value1 : aval<'T1>
value2 : aval<'T2>
Returns: aval<'T3>

map3 mapping value1 value2 value3

Full Usage: map3 mapping value1 value2 value3

Parameters:
    mapping : 'T1 -> 'T2 -> 'T3 -> 'T4
    value1 : aval<'T1>
    value2 : aval<'T2>
    value3 : aval<'T3>

Returns: aval<'T4>

Returns a new adaptive value that adaptively applies the mapping function to the given adaptive inputs.

mapping : 'T1 -> 'T2 -> 'T3 -> 'T4
value1 : aval<'T1>
value2 : aval<'T2>
value3 : aval<'T3>
Returns: aval<'T4>

mapNonAdaptive mapping value

Full Usage: mapNonAdaptive mapping value

Parameters:
    mapping : 'T1 -> 'T2
    value : aval<'T1>

Returns: aval<'T2>

Returns a new adaptive value that applies the mapping function whenever a value is demanded. This is useful when applying very cheap mapping functions (like unbox, fst, etc.) WARNING: the mapping function will also be called for unchanged inputs.

mapping : 'T1 -> 'T2
value : aval<'T1>
Returns: aval<'T2>

Type something to start searching.