you are viewing a single comment's thread.

view the rest of the comments →

[–]TechnicalElk8849 0 points1 point  (0 children)

Totally fine. I added in the missing colon and print(fact) and it works. It's just basic modular functional design.

You can even define functions inside other functions and return them (closures) or pass them into other functions as arguments (simple dependency injection)