Created
October 3, 2016 10:56
-
-
Save fiadliel/d2e1bad798d1d312e83671cfc8b71497 to your computer and use it in GitHub Desktop.
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
import fs2._ | |
def pipeR[F, A, B, C](pipe: Pipe[F, B, C]): Pipe[F, (A, B), (A, C)] = { | |
s => | |
s.map(_._1).zip(s.map(_._2).through(pipe)) | |
} | |
def pipeL[F, A, B, C](pipe: Pipe[F, A, C]): Pipe[F, (A, B), (C, B) = { | |
s => | |
s.map(_._1).through(pipe).zip(s.map(_._2)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment