This is a swift function that calculates:
- Factorials [ n! ]
- Semi-factorials [ n!! ]
- Twice iterated factorials [ (n!)! ]
This function allows to obtain infinite numbers due to a function that performs multiplications using and returning Strings.
As each factorial increases exponentially, the time to calculate the next factorial increases exponentially as well.