Tail call optimize bowling solution