Factorials, types in functions