Created
July 10, 2015 17:22
-
-
Save lasandell/d42116257156e21552bd to your computer and use it in GitHub Desktop.
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
open System | |
type Disposable() = | |
do printfn "Constrcuted!" | |
interface IDisposable with | |
member x.Dispose() = printfn "Disposed!" | |
let sequence = | |
seq { | |
use disposable = new Disposable() | |
yield! [1; 2; 3] | |
} | |
sequence |> Seq.iter (printfn "%d") | |
sequence |> Seq.iter (printfn "%d") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment