Let's say I have a string "sky is blue" and inside flow I divide it into several elements I would like to propagate down the graph.
Source.single("only one element")
.via(Flow.fromFunction(string => string.split(" ").toSeq))
.map(*do something for each word*)
In this code the Flow
has type Flow[String, Seq[String, NotUsed]
, which makes sense as Flows must have exactly one output.
Is there any Akka Streams mechanism to solve that problem?