<p dir="ltr">On Aug 7, 2016 3:22 PM, "Jan-Willem Maessen" <<a href="mailto:jmaessen@alum.mit.edu">jmaessen@alum.mit.edu</a>> wrote:<br>
> Are there good examples of increasing / decreasing predicates that don't embed a split element?  Because split already gives the results you want.</p>
<p dir="ltr">An obvious one is</p>
<p dir="ltr">isRight :: Either a b -> Bool.</p>
<p dir="ltr">Another is</p>
<p dir="ltr">fst :: (Bool, a) -> Bool</p>
<p dir="ltr">> 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.<br>
><br>
> 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.</p>
<p dir="ltr">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.</p>