Last active
December 19, 2015 06:29
This file contains hidden or 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 Lisst { | |
def apply[A](a: A): Lisst[A] = NonEmptyLisst(a, EmptyLisst) | |
} | |
private case class NonEmptyLisst[+A]( | |
head: A, | |
tail: Lisst[A]) | |
extends Lisst[A] | |
private case object EmptyLisst extends Lisst[Nothing] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment