anchpop / wise_mans_haskell

Free book for learning Haskell
https://andre.tips/wmh/
48 stars 5 forks source link

Mistake in length' function using case statements #6

Closed gfredtech closed 5 years ago

gfredtech commented 5 years ago

length' xs = case xs of [] -> []
(_:xs) -> 1+ length' xs

should be [] -> 0 instead

anchpop commented 5 years ago

Thanks! fixed