module Exercise_8 where import Data.List import Data.Ratio {-WETT-} shoefa :: (Num a, Ord a) => [a] -> Int shoefa xs = help clean (head clean) where clean = filter (/= 0) xs help [] _ = 0 help (x:xs) last = if signum x /= signum last then 1 + help xs x else help xs last {-TTEW-}