Created
April 5, 2018 15:48
-
-
Save Odomontois/cb23d062bae84fd4a2f2cd783577e086 to your computer and use it in GitHub Desktop.
Source lazy concat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implicit class SourceLazyOps[E, M](val src: Source[E, M]) extends AnyVal { | |
def concatLazy[M1](src2: => Source[E, M1]): Source[E, NotUsed] = | |
Source(List(() => src, () => src2)).flatMapConcat(_ ()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment