module Exercise_8 where import Data.List import Data.Bifunctor import Data.Functor import Control.Monad {-WETT-} shoefa :: (Num a, Ord a) => [a] -> Int -- filter out 0's, and zip every adjacent element by multipliying, after that take the length of all negative numbers shoefa = length . filter (<0) . (zipWith (*) `ap` tail) . filter (/=0) {-TTEW-}