-- a has to be of type Eq -- works by filtering the list by that element, then counting the length count :: Eq a => a -> [a] -> Int count elem elements = length $ filter (==elem) elements
-- a has to be of type Eq -- works by filtering the list by that element, then counting the length count :: Eq a => a -> [a] -> Int count elem elements = length $ filter (==elem) elements