The “Scala” way (or Functional way) of performing a sum of numbers. Many programming tasks can be written in Scala using similar concepts without the use of explicit while loops.
while