Factorial for and while loop, lists