<div dir="ltr">Just an idea: "Asc" and "Desc" are relatively common abbreviations for increasing and decreasing. Not sure how I feel about them though.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 7, 2016 at 1:04 AM, David Feuer <span dir="ltr"><<a href="mailto:david.feuer@gmail.com" target="_blank">david.feuer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Sorry about that. filterIncreasing and filterDecreasing filter assuming a predicate that is increasing or decreasing on the key values. So instead of an O(n) pass over the whole set/map, they simply perform an O(log n) split.</p><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><div class="gmail_quote">On Aug 6, 2016 11:31 PM, "Ivan Lazar Miljenovic" <<a href="mailto:ivan.miljenovic@gmail.com" target="_blank">ivan.miljenovic@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 7 August 2016 at 13:15, David Feuer <<a href="mailto:david.feuer@gmail.com" target="_blank">david.feuer@gmail.com</a>> wrote:<br>
> Cale Gibbard and Ryan Trinkle are interested in adding some more<br>
> operations they say will be useful in their work. Note that<br>
> unionWithMapping is intended to enable an efficient implementation of<br>
> alignWith in Data.Align in the `these` package.<br>
><br>
> Set:<br>
><br>
> filterIncreasing :: Ord a => (a -> Bool) -> Set a -> Set a<br>
> filterDecreasing :: Ord a => (a -> Bool) -> Set a -> Set a<br>
> partitionIncreasing :: Ord a => (a -> Bool) -> Set a -> (Set a, Set a)<br>
<br>
I'm not sure what the difference between the first two functions are,<br>
or even how they differ from a generic filter function.<br>
<br>
><br>
> Map:<br>
><br>
> filterKeysIncreasing :: Ord k => (k -> Bool) -> Map k a -> Map k a<br>
> filterKeysDecreasing :: Ord k => (k -> Bool) -> Map k a -> Map k a<br>
> partitionKeysIncreasing :: Ord k => (k -> Bool) -> Map k a -> (Map k a, Map k a)<br>
><br>
> traverseMaybe :: Applicative f => (a -> f (Maybe b)) -> Map k a -> f (Map k b)<br>
><br>
> alterMany :: Ord k => (a -> Maybe b -> Maybe b) -> Map k a -> Map k b -> Map k b<br>
><br>
> alterManyA :: (Applicative f, Ord k) => (a -> Maybe b -> f (Maybe b))<br>
> -> Map k a -> Map k b -> f (Map k b)<br>
><br>
> unionWithMapping :: Ord k => (a -> c) -> (b -> c) -> (a -> b -> c) -><br>
> Map k a -> Map k b -> Map k c<br>
><br>
> unionWithKeyMapping :: Ord k => (k -> a -> c) -> (k -> b -> c) -> (k<br>
> -> a -> b -> c)<br>
> -> Map k a -> Map k b -> Map k c<br>
> ______________________________<wbr>_________________<br>
> Libraries mailing list<br>
> <a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/libraries</a><br>
<br>
<br>
<br>
--<br>
Ivan Lazar Miljenovic<br>
<a href="mailto:Ivan.Miljenovic@gmail.com" target="_blank">Ivan.Miljenovic@gmail.com</a><br>
<a href="http://IvanMiljenovic.wordpress.com" rel="noreferrer" target="_blank">http://IvanMiljenovic.wordpres<wbr>s.com</a><br>
</blockquote></div></div>
</div></div><br>______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>