Skip to content

Instantly share code, notes, and snippets.

@saturov
Created April 18, 2016 14:06
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 saturov/dead509398a9c2c302241e3e102b6894 to your computer and use it in GitHub Desktop.
Save saturov/dead509398a9c2c302241e3e102b6894 to your computer and use it in GitHub Desktop.
sealed class Expr {
class Const(val number: Double) : Expr()
class Sum(val e1: Expr, val e2: Expr) : Expr()
object NotANumber : Expr()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment