Last active
September 23, 2019 11:55
-
-
Save Koisell/9e58e20d3d30908f57b07d541e1efa58 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
// 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