Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// A function which calls itself explicitly:
def length[A](list: List[A]) = list match {
case h::t => 1 + length(t)
case Nil => 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.