Guest User

Untitled

a guest
Apr 22nd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. scala> def add(x: Any) = x match {
  2. | case h :: t => h + add(t)
  3. | case _ => 0
  4. | }
  5. <console>:5: error: recursive method add needs result type
  6. case h :: t => h + add(t)
Add Comment
Please, Sign In to add comment