Last active
April 3, 2016 20:55
-
-
Save Krasnyanskiy/09d6ae0f4b6630ce3a92237c67bd7715 to your computer and use it in GitHub Desktop.
-scala: type classes?
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
trait A { | |
def foo() | |
} | |
trait B { | |
def bar() | |
} | |
trait C { | |
self: A with B => | |
} | |
new C with B with A { | |
def bar(): Unit = () | |
def foo(): Unit = () | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment