Skip to content

Instantly share code, notes, and snippets.

@aludwiko
Created November 17, 2017 12:05
Show Gist options
  • Save aludwiko/bc18f99605145949f9c93f4694d249a1 to your computer and use it in GitHub Desktop.
Save aludwiko/bc18f99605145949f9c93f4694d249a1 to your computer and use it in GitHub Desktop.
Source(1 to 5)
 .alsoTo(Sink.foreach{x =>
  Thread.sleep(100)
  println(s”elem:$x alsoTo”)}
 )
 .map { x =>
  println(s”elem:$x map”)
  x
 }
 .to(Sink.foreach(x => println(s”elem:$x to”)))
 .run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment