Created
October 16, 2018 14:17
-
-
Save dbrattli/215f3283a60c845e6f597e3faef8f06d to your computer and use it in GitHub Desktop.
Continuation type
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 Cont<'a> = 'a -> unit | |
type Continuation<'a> = | |
Continuation of (Cont<'a> -> unit) with | |
static member Return (value: 'a) = | |
let run (cont: Cont<'a>) = | |
cont value | |
Continuation run | |
member this.Run (cont: Cont<'a>) : unit = | |
match this with Continuation run -> run cont |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment