Created
August 28, 2013 20:18
-
-
Save shajra/6370695 to your computer and use it in GitHub Desktop.
Is there a way to avoid this kind of name collision?
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
def newExistential[S] | |
(producer: Inputs => S, consumer: S => Output) | |
: Existential = { | |
type SS = S | |
val producer_ = producer | |
val consumer_ = consumer | |
new Existential { | |
type S = SS | |
def producer(is: Inputs) = producer_(is) | |
def consumer(s: S) = consumer_(s) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment