Skip to content

Instantly share code, notes, and snippets.

@ohlawdie
Created February 11, 2020 22:41
Show Gist options
  • Save ohlawdie/9bff2c99b21a2cc9ba161f127c068474 to your computer and use it in GitHub Desktop.
Save ohlawdie/9bff2c99b21a2cc9ba161f127c068474 to your computer and use it in GitHub Desktop.
C8 Async Streams #F
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