Store Module
Functions for working with stores
Functions and values
Function or value | Description |
|
|
|
Example
val store: obj
val whenDistinct: obj
val sub1: obj
val printfn: format: Printf.TextWriterFormat<'T> -> 'T
val sub2: obj
|
Full Usage:
Store.filter predicate store
Parameters:
'A -> bool
store : IObservable<'A>
Returns: IObservable<'A>
|
Example
val usersOver18: obj
Multiple items
val string: value: 'T -> string -------------------- type string = System.String |
|
Example
val value: int
val value2: obj
module Option
from Microsoft.FSharp.Core
val isNone: option: 'T option -> bool
|
Full Usage:
Store.getMap callback store
Parameters:
'a -> 'b
store : IStore<'a>
Returns: 'b
|
This might be called foldMap
Example
val store: 'a
Multiple items
val string: value: 'T -> string -------------------- type string = System.String Multiple items
val decimal: value: 'T -> decimal (requires member op_Explicit) -------------------- type decimal = System.Decimal -------------------- type decimal<'Measure> = decimal val formattedBudget: string
val sprintf: format: Printf.StringFormat<'T> -> 'T
val printf: format: Printf.TextWriterFormat<'T> -> 'T
|
Full Usage:
Store.iter callback source
Parameters:
'A -> unit
source : IObservable<'A>
Returns: IDisposable
|
Example
val printfn: format: Printf.TextWriterFormat<'T> -> 'T
|
|
Example
val intStore: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int val anonymousStore: obj
Multiple items
val string: value: 'T -> string -------------------- type string = System.String type 'T option = Option<'T>
union case Option.None: Option<'T>
|
|
Creates a store and a dispatch function as
Example
type State =
{ count: int }
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int type Msg =
| Increment
| Decrement
| Reset
| AsyncIncrement
| AsyncDecrement
val init: 'a -> State * 'b
union case Msg.AsyncIncrement: Msg
val wait1S: unit -> Async<unit>
val async: AsyncBuilder
Multiple items
type Async = static member AsBeginEnd: computation: ('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit) static member AwaitEvent: event: IEvent<'Del,'T> * ?cancelAction: (unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate) static member AwaitIAsyncResult: iar: IAsyncResult * ?millisecondsTimeout: int -> Async<bool> static member AwaitTask: task: Task<'T> -> Async<'T> + 1 overload static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout: int -> Async<bool> static member CancelDefaultToken: unit -> unit static member Catch: computation: Async<'T> -> Async<Choice<'T,exn>> static member Choice: computations: Async<'T option> seq -> Async<'T option> static member FromBeginEnd: beginAction: (AsyncCallback * obj -> IAsyncResult) * endAction: (IAsyncResult -> 'T) * ?cancelAction: (unit -> unit) -> Async<'T> + 3 overloads static member FromContinuations: callback: (('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> ... -------------------- type Async<'T> static member Async.Sleep: dueTime: System.TimeSpan -> Async<unit>
static member Async.Sleep: millisecondsDueTime: int -> Async<unit> val upddate: msg: Msg -> state: 'a -> 'a * 'b
val msg: Msg
val state: 'a
union case Msg.Increment: Msg
union case Msg.Decrement: Msg
union case Msg.AsyncDecrement: Msg
union case Msg.Reset: Msg
val view: unit -> 'a
val state: obj
val dispatch: obj
val ignore: value: 'T -> unit
|
|
Example
type State =
{ count: int }
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int type Msg =
| Increment
| Decrement
| Reset
val init: 'a -> State
val upddate: msg: Msg -> state: 'a -> 'b
val msg: Msg
val state: 'a
union case Msg.Increment: Msg
union case Msg.Decrement: Msg
union case Msg.Reset: Msg
val view: unit -> 'a
val state: obj
val dispatch: obj
val ignore: value: 'T -> unit
|
Full Usage:
Store.map callback store
Parameters:
'A -> 'B
store : IObservable<'A>
Returns: IObservable<'B>
|
Example
val subscription: obj
Multiple items
val string: value: 'T -> string -------------------- type string = System.String |
Full Usage:
Store.map2 callback storeA storeB
Parameters:
'A -> 'B -> 'Res
storeA : IObservable<'A>
storeB : IObservable<'B>
Returns: IObservable<'Res>
|
Example
val subscription: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int |
Full Usage:
Store.mapDistinct callback store
Parameters:
'A -> 'B
store : IObservable<'A>
Returns: IObservable<'B>
|
|
|
Example
val store: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int val squareMe: unit -> 'a
|
|
Example
val value: int
|
Full Usage:
Store.subscribe callback store
Parameters:
'T -> unit
store : IObservable<'T>
Returns: IDisposable
|
Example
val subscription: obj
val printfn: format: Printf.TextWriterFormat<'T> -> 'T
|
Full Usage:
Store.subscribe2 source1 source2 callback
Parameters:
IObservable<'A>
source2 : IObservable<'B>
callback : 'A * 'B -> unit
Returns: IDisposable
|
Example
val player1Score: obj
val player2Score: obj
val printPlayerScores: score1: int -> obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int val printfn: format: Printf.TextWriterFormat<'T> -> 'T
val scores: obj
|
Full Usage:
Store.zip source1 source2
Parameters:
IObservable<'a>
source2 : IObservable<'b>
Returns: IObservable<'a * 'b>
|
Example
val tableInfo: 'a
module Observable
from Microsoft.FSharp.Control
|