Skip to content

Instantly share code, notes, and snippets.

@aashritag
Created October 30, 2018 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aashritag/e8c0b21699296c44cac38e366737dce6 to your computer and use it in GitHub Desktop.
Save aashritag/e8c0b21699296c44cac38e366737dce6 to your computer and use it in GitHub Desktop.
val source: Source[Int, NotUsed] = Source(1 to 10)
source.filter(_ % 2 == 0).runForeach(println)
source.filter(_ % 2 != 0).runForeach(println)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment