I am a newbie to Akka Stream, so apology, if I ask any stupid question.
I was going through the Akka Stream QuickStart guide. And I found scan
operation. The documentation says that it is similar to fold
but is not a terminal operation. I got that part, but when I found scanAsync
then the documentation said the same thing, except for one thing, i.e., it is similar to scan
but with an asynchronous function.
Now, my doubts are:
f
is different. The output value of the f function in the case with scanAsync is Future. So the next computation will begin as soon as the Future will be completed. But, when using scan computation of the next value will begin immediately after the computing of the current one.Hope it helped!!!