I am currently learning Haskell, and I have run into not so much a problem but a point of confusion. I'm looking at examples from the e-book "Learn you a Haskell". (http://learnyouahaskell.com/higher-order-functions) and there is an example of a lambda function and foldl that I don't quite understand. So, in the example the code provided to re-create the reverse function is as follows:
reverse' :: [a] -> [a]
reverse' = foldl (\acc x -> x : acc) []
Which I have compiled, and run succesfully. However I don't understand why you don't need to specify where the list is coming from like so:
reverse' :: [a] -> [a]
reverse' e = foldl (\acc x -> x : acc) [] e
(Where e would be the list [a] from the user input).
Can someone explain this, or even point me to a document that explains it? Thanks :)