Wrote factorial function
Added function for cycling a list.