Re: Why do i need to take out the list for this to work
Square brackets  are pattern match syntax for lists. This will only work for lists of length 1, anything else will be an error. Get rid of the brackets on both sides of the equation and it will do what you expect.
Typically list variables are given plural names, such as xs instead of x.