Last active
October 23, 2017 16:53
-
-
Save Jacoby6000/7042800aceaa463b8f889441347e2da9 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
sealed trait Pipeline[A, B, C] { | |
def compose[D, E, F](that: Pipeline[D, E, F]): Compose[A, B, C, D, E] = Compose(this, that) | |
} | |
case class Compose[A, B, C, D, E](p1: Pipeline[A, B, C], p2: Pipeline[C, D, E]) extends Pipeline[A, (B, D), E] | |
case class Run[A, B, C](f: A => B => C) extends Pipeline[A, B, C] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment