Created
March 18, 2015 02:30
-
-
Save OwenChang/42deeed6d50718ffd2ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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