def recursiveSum(xs: List[Int]): Int =
if (xs.isEmpty) 0
else (xs.head + recursiveSum(xs.tail))
recursiveSum(List(1, 2, 3))
// res0: Int = 6
Scala- 30 min
- Blog
- Machine Learning
- Python
Machine Learning is a field focused on developing, comprehending, and utilizing computer programs that can learn from experience to model,…