module Exercise_8 where import Data.List {-WETT-} {- shoefa cs = go (filter(/=0) cs) where go [] = 0 go (x:[]) = 0 go (x:y:xs) = if x*y < 0 then 1 + go (y:xs) else go (y:xs) -} shoefa xs = length (filter (<0) (zipWith (*) cs $ tail cs)) where cs = filter (/=0) xs {-TTEW-}