Created
June 29, 2016 13:30
-
-
Save notyy/66e7c7d766ea00f02bb59501b5404f7f to your computer and use it in GitHub Desktop.
This file contains 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
trait ReactiveComponent[Input, Output] | |
trait SimpleTransformation[Input, Output] extends ReactiveComponent[Input, Output] { | |
val outer = this | |
def update(input: Input): Output | |
def conn[Output1](nextSimpleTrans: SimpleTransformation[Output, Output1]): SimpleTransformation[Input, Output1] = { | |
new SimpleTransformation[Input, Output1] { | |
override def update(input: Input): Output1 = { | |
val output: Output = outer.update(input) //outer.update return's Output1 type? | |
nextSimpleTrans.update(output) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment