Skip to content

Instantly share code, notes, and snippets.

@delexi
Created April 1, 2012 13:00
Show Gist options
  • Select an option

  • Save delexi/2275178 to your computer and use it in GitHub Desktop.

Select an option

Save delexi/2275178 to your computer and use it in GitHub Desktop.
sealed trait Enum { def value: Int }
case class Element1 extends Enum { def value = 1 }
case class Element2 extends Enum { def value = 2 }
case class Element3 extends Enum { def value = 3 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment