Table of contents
Collapse the table of content
Expand the table of content

Observable.pairwise<'T> Function (F#)

Den Delimarsky|Last Updated: 8/18/2017
1 Contributor

Returns a new observable that triggers on the second and subsequent triggerings of the input observable. The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as a pair. The argument passed to the N-1th triggering is held in hidden internal state until the Nth triggering occurs.

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

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


// Signature:
Observable.pairwise : IObservable<'T> -> IObservable<'T * 'T>

// Usage:
Observable.pairwise source


source Type: IObservable<'T>

The input observable.

Return Value

An Observable that triggers on successive pairs of observations from the input observable.


For each observer, the registered intermediate observing object is not thread safe. That is, observations arising from the source must not be triggered concurrently on different threads.

This function is named Pairwise 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

Version Information

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

See Also

Control.Observable Module (F#)

Microsoft.FSharp.Control Namespace (F#)

© 2020 Microsoft