Skip to content

Instantly share code, notes, and snippets.

@sullivan-
Last active December 19, 2015 06:29
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