Advertisement
Guest User

Untitled

a guest
Jan 30th, 2014
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.66 KB | None | 0 0
  1. let mutable success = None
  2. let mutable except = None
  3. let mutable cancel = None
  4. let catchContinuations (s, e, c) =
  5.     success <- Some s
  6.     except <- Some e
  7.     cancel <- Some c
  8.  
  9. async {
  10.     do! Async.FromContinuations catchContinuations
  11.     printfn "Test"
  12. } |> Async.StartImmediate
  13.  
  14. let inline analyze x =
  15.     printfn ".ToString () = %A" <| x.ToString ()
  16.     printfn "%%A = %A" x
  17.     let t = x.GetType ()
  18.     printfn "Type: %A" t
  19.     printfn "Members: %A" <| t.GetMembers (enum -1)
  20.  
  21. [<EntryPoint>]
  22. do
  23.     printfn "success"
  24.     analyze success.Value
  25.     printfn "\nexcept"
  26.     analyze except.Value
  27.     printfn "\ncancel"
  28.     analyze cancel.Value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement