Optimized Tail Recursion

AppSignal’s article is explaining it quite okay.