16. copyright Fringe81 Co.,Ltd.
implicit val system = ActorSystem()
implicit val materializer = ActorMaterializer()
val source = Source(1 to 10)
val filter = Flow[Int].filter(_ % 2 == 0)
val map = Flow[Int].map(_ * 2)
val sink = Sink.foreach[Int](println)
val runnableGraph =
source.via(filter).via(map).to(sink)
runnableGraph.run()
materializer
WHAT
HOW