Export (0) Print
Expand All

Observable.split<'T,'U1,'U2> Function (F#)

Returns two observables which split the observations of the source by the given function. The first will trigger observations for which the splitter returns Choice1Of2. The second will trigger observations y for which the splitter returns Choice2Of2. The splitter is executed once for each subscribed observer. Both also propagate error observations arising from the source and each completes when the source completes.

Namespace/Module Path: Microsoft.FSharp.Control.Observable

Assembly: FSharp.Core (in FSharp.Core.dll)

// Signature:
Observable.split : ('T -> Choice<'U1,'U2>) -> IObservable<'T> -> IObservable<'U1> * IObservable<'U2>

// Usage:
Observable.split splitter source


Type: 'T -> Choice<'U1,'U2>

The function that takes an observation and transforms it into one of the two output Choice types.


Type: IObservable<'T>

The input Observable.

A tuple of Observables. The first triggers when splitter returns Choice1of2 and the second triggers when splitter returns Choice2of2.

This function is named Split in compiled assemblies. If you are accessing the function from a language other than F#, or through reflection, use this name.

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

© 2014 Microsoft