Created
February 11, 2020 22:41
-
-
Save ohlawdie/9bff2c99b21a2cc9ba161f127c068474 to your computer and use it in GitHub Desktop.
C8 Async Streams #F
This file contains hidden or 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
| namespace global | |
| open System | |
| open System.Collections.Generic | |
| open System.Threading.Tasks | |
| namespace ExploreCsharpEight | |
| type AsyncStreams() = | |
| member this.GenerateSequence() = | |
| do | |
| let mutable (i : int) = 0 | |
| while (i < 20) do | |
| if i % 3 = 0 | |
| then (* ERROR UnknownNode *) | |
| (* ERROR UnknownNode *) | |
| i <- i + 1 | |
| i | |
| () | |
| member this.ConsumeStream() = | |
| for number in this.GenerateSequence () do | |
| Console.WriteLine ((sprintf "The time is %O::hh:mm:ss. Retrieved %O" DateTime.Now) number) | |
| 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment