-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Milestone
Description
I'm trying to port an example from https://doc.akka.io/docs/akka/snapshot/stream/stream-substream.html
use system = ActorSystem.Create("test")
let mat = system.Materializer()
let text = "This is the first line.\nThe second line.\nThere is also the 3rd line\n"
Source.From(text.ToCharArray())
.SplitAfter(fun x -> x = '\n')
.Where(fun x -> x <> '\n')
.Select(fun _ -> 1)
.Aggregate(0, fun s x -> s + x)
.To(Sink.ForEach(fun x -> Console.WriteLine (sprintf "%A" x)))
.Run(mat)
|> ignore
Console.ReadKey() |> ignore
As the docs says, it should output
23
16
26
but it outputs
26
0
16
23
Where does the 0
come from?