Remi-Leblond/S99 — comment on commit 5476124d708c40b1574dbf0b4322103a86979b91
File: src/S1.scala line 44
By LannyRipple:

Note that on a HUGE list this could blow the stack while it is holding the return frames trying to add up all the 1 + 1 + 1 + ...
The answer for this is tail recursion with an accumulator.

```scala
def listLength[A](xs: List[A]): Int = {
@annotation.tailrec
def mylen(ys: List[A], z: Int): Int = if (ys.isEmpty) z else mylen(ys.tail, z+1)
mylen(xs, 0)
}
```