Skip to content

Instantly share code, notes, and snippets.

@kings13y
Created June 15, 2011 21:12
Show Gist options
  • Save kings13y/1028130 to your computer and use it in GitHub Desktop.
Save kings13y/1028130 to your computer and use it in GitHub Desktop.
abstract types example
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