Skip to content

Instantly share code, notes, and snippets.

@folone
Created July 11, 2011 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save folone/1075437 to your computer and use it in GitHub Desktop.
Save folone/1075437 to your computer and use it in GitHub Desktop.
emulating ADT with case classes in scala
// haskell:
// data Bool = False | True
// scala
sealed abstract class Bool
case object True extends Bool
case object False extends Bool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment