
On Aug 7, 2016 3:22 PM, "Jan-Willem Maessen"
Are there good examples of increasing / decreasing predicates that don't embed a split element? Because split already gives the results you want.
An obvious one is isRight :: Either a b -> Bool. Another is fst :: (Bool, a) -> Bool
There's a pretty large combinatorial space of these functions – I'm not sure Data.Map and Data.Set should fill that entire space with individually-named functions.
The applicative versions suggest there might want to be an applicative-friendly version of mergeWithKey, but again it's not obvious we need the 32767 different combinations of individual functions.
Indeed, that is cause for concern. I wrote another email suggesting a combinator subsuming several of these using a GADT to deal with the type equalities some of them require.