Skip to content

Instantly share code, notes, and snippets.

@OwenChang
Created March 18, 2015 02:30
Show Gist options
  • Save OwenChang/42deeed6d50718ffd2ac to your computer and use it in GitHub Desktop.
Save OwenChang/42deeed6d50718ffd2ac to your computer and use it in GitHub Desktop.
object MainX {
println("Welcome to the Scala worksheet")
sealed abstract class MyList[+T]
case object Nil extends MyList[Nothing]
case class Cons[T] (element: T, list: MyList[T]) extends MyList[T]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment