module Exercise_8 where import Data.List import Data.Ratio {-WETT-} shoefa :: (Num a, Ord a) => [a] -> Int shoefa xs = length . filter (uncurry (/=)) $ zip signs $ tail signs where signs = map signum . filter (/=0) $ xs {-TTEW-}