fsharp: step5: Added tail call optimization.