Created
June 15, 2011 21:12
-
-
Save kings13y/1028130 to your computer and use it in GitHub Desktop.
abstract types example
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 scala.collection.GenSeq | |
trait SimpleListTypeContainer { | |
type Simple // declare an abstract type with the label Simple | |
type SimpleList <: GenSeq[Simple] // Constrain the Simple List abstract type based on the previously defined abstract type | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment