For example, this is not a tail call :
map _ [] = []
map f (x : xs) = f x : map f xs
the recursive callis guarded by the (:) data constructor, so it won't build up a huge stack like an equivalent in some other language might do. It works like this :
map (+1) (1 : 2 : 3 : [])
2 : map (+1) (2 : 3 : [])
2 : 3 : map (+1) (3 : [])
2 : 3 : 4 : map (+1) []
2 : 3 : 4 : []
Why not
map (+1) (1 : 2 : 3 : [])
2 : map (+1) (2 : 3 : [])
2 : (3 : map (+1) (3 : []))
2 : (3 : (4 : map (+1) []))
2 : (3 : (4 : []))
2 : (3 : [4])
2 : [3, 4]
[2, 3, 4]
It has to do with WHNF, but I still can't understand it well :(