Im learning Haskell, can someone explain me, why this function works? i mean, how the induction case is not running forever? what is the stop condition here?
myLength :: [a] -> Integer
myLength [] = 0
myLength (x:xs) = (+1) (myLength xs)