-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A Source.SplitAfter Akka example extra output #3222
Comments
If I replace |
A simpler example. Akka val xs =
List(
Some(1), Some(2), None,
Some(3), Some(4), None,
Some(5), None)
Source(xs)
.splitAfter(_.isEmpty)
.filter(_.isDefined)
.fold(List[Int]())((x, r) => r.get +: x)
.to(Sink.foreach(println))
.run()
Akka.NET use system = ActorSystem.Create("test")
let mat = system.Materializer()
let xs =
[ Ok 1; Ok 2; Error 0
Ok 3; Ok 4; Error 0
Ok 5; Error 0 ]
Source.From(xs)
.SplitAfter(fun x -> match x with Ok _ -> false | _ -> true)
.Where(fun x -> match x with Ok _ -> true | _ -> false)
.Aggregate([], fun r (Ok x) -> x :: r)
.To(Sink.ForEach(fun x -> printfn "%A" x))
.Run(mat)
|> ignore
(here I use F# |
Problem ist that |
@vasily-kirichenko should be fixed in the next release, thx for reporting. |
Thank you very much :) |
I'm trying to port an example from https://doc.akka.io/docs/akka/snapshot/stream/stream-substream.html
As the docs says, it should output
but it outputs
Where does the
0
come from?The text was updated successfully, but these errors were encountered: