Created
November 3, 2009 07:25
-
-
Save cflewis/224865 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
scala> def add(x: Any) = x match { | |
| case h :: t => h + add(t) | |
| case _ => 0 | |
| } | |
<console>:5: error: recursive method add needs result type | |
case h :: t => h + add(t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment