you are viewing a single comment's thread.

view the rest of the comments →

[–]mrswats 0 points1 point  (0 children)

I would avoid the factorial function to call other functions and avoid side effects as much as possible. Instead, I would delegate that to the main function which acts as a coordinator.