module Exercise_8 where import Data.List import Data.Ord {-WETT-} {-MCCOMMENT (zipWith (/=) =<< tail) from https://stackoverflow.com/a/8409037/5398479 -} shoefa :: (Num a, Ord a) => [a] -> Int shoefa = sum . map fromEnum . (zipWith (/=) =<< drop 1) . map signum . filter (/= 0) {-TTEW-}