Created
October 16, 2018 20:31
-
-
Save dbrattli/760faaec985c4babed21ca49133ea0ea to your computer and use it in GitHub Desktop.
Observable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type OnNext<'a> = 'a -> unit | |
type Observable<'a> = | |
Observable of (OnNext<'a> -> unit) with | |
static member Single (value: 'a) = | |
let subscribe (onNext: OnNext<'a>) = | |
onNext value | |
Observable subscribe | |
member this.Subscribe (onNext: OnNext<'a>) : unit = | |
match this with Observable subscribe -> subscribe onNext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment