• + 0 comments

    If you're going to use tail recursion in Scala, you need to annotate the helper function with @tailrec.