It makes me feel a little dirty to add `factorial` to the main namespace, but it's not hurting anyone and creating a temporary namespace made things much messier.