Skip to content

Instantly share code, notes, and snippets.

@mrvisser
Created May 13, 2017 11:20
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 mrvisser/5bf409ac1d51795fd1dfc58a03ea2dde to your computer and use it in GitHub Desktop.
Save mrvisser/5bf409ac1d51795fd1dfc58a03ea2dde to your computer and use it in GitHub Desktop.
+sealed trait MyList[+A]
+case class Cons[A](head: A, tail: MyList[A]) extends MyList[A]
+case object Nil extends MyList[Nothing]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment