I'm trying to figure out how to negate the results of two parameter boolean function like not . any
. I understand why it didn't work by breaking it down as shown below, but I'm not sure how to write a function that does this elegantly. I managed to do curry $ not . uncurry any
Prelude> :t not
not :: Bool -> Bool
Prelude> :t any
any :: Foldable t => (a -> Bool) -> t a -> Bool
Prelude> :t (.)
(.) :: (b -> c) -> (a -> b) -> a -> c
curry $ not . uncurry any
:: Foldable t => (a -> Bool) -> t a -> Bool