I\'ve been trying to define a function which, given a list of Integers and an Integer n, returns a Boolean indicating whether n occurs exactly once in the list.
I have t
once :: (Eq a) => [a] -> a -> Bool once xs x = (== 1) $ length $ filter (== x) xs