Guest User

Untitled

a guest
Jul 19th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. def sum(l: List[Int]) = {
  2. def s(i: List[Int], acc: Int): Int = i match {
  3. case x::xs => s(xs, acc + x)
  4. case Nil => acc
  5. }
  6. s(l, 0)
  7. }
Add Comment
Please, Sign In to add comment