Ben Chuanlong Du's Blog

It is never too late to learn.

Recursion in Scala

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tricks to Write Tail Recursive Calls

  1. A useful trick to write tail recursive function is to include the result to return as a parameter. If the result to return is a …