Skip to content

Instantly share code, notes, and snippets.

@cflewis
Created November 3, 2009 07:25
Show Gist options
  • Save cflewis/224865 to your computer and use it in GitHub Desktop.
Save cflewis/224865 to your computer and use it in GitHub Desktop.
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