When I put the following lambda expression in ghci I get 1:
ghci> (\x -> x+1) 0
1
But when I use that function with iterate I get
ghci> take 10 (iterate (\x -> x+1) 0)
[0,1,2,3,4,5,6,7,8,9]
I expected to get a list equal to [1..10]. Why not?
The first result of iterate is the original input without the function applied, i.e. the function is called 0 times. That’s why the result is one off from what you expect.