Ok, I get this all recursion is more functional because you are not changing the state of any object in an iteration. However there is nothing stopping you do this in scala.
var magoo = 7;
def mergeSort(xs: List[Int]): List[Int] = {
...
magoo = magoo + 1
mergeSort(xs1, xs2);
}
In fact, you can make recursion just as side effectless in Scala as you can in Java. So is it fair to say that Scala just make it easier to write concise recursion by using pattern matching? Like there is nothing stopping me writing any stateless recursion code in Java that I can write in Scala?
The point is really that in Scala complex recursion can be achieved with neater code. That's all. Correct?