<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div>As a tangent I am interested in knowing what would be the typeclass for this sort of operation:</div><div><br></div><div> - take all the elements out of `f a`</div><div> - do something with them with a function a -> b</div><div> - insert the results back to get the same "original shape" `f b`</div><div><br></div><div>In this case "do something with them" is "order them" but it could also be </div><div>"invoke a function with all the 'a's and dispatch back the results" to allow "batching" function calls.</div><div><br></div><div><br></div><div class="ydpe858ab0dsignature"><font class="ydpe858ab0dApple-style-span" size="2" color="#00407F" face="arial, helvetica, sans-serif">------------------------------------------------<br>Eric TORREBORRE<br>T +49 176 420 8383 4<br>E etorreborre@yahoo.com<br>P http://specs2.org<br>B http://etorreborre.blogspot.com<br>------------------------------------------------</font></div></div>
            <div><br></div><div><br></div>
            
            <div id="ydpa0f7d8b6yahoo_quoted_8487689512" class="ydpa0f7d8b6yahoo_quoted">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        Le mardi 17 octobre 2017 à 11:05:43 UTC+2, Henning Thielemann <lemming@henning-thielemann.de> a écrit :
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div dir="ltr"><div class="ydpa0f7d8b6yqt7100988427" id="ydpa0f7d8b6yqtfd71220"><br clear="none">On Mon, 16 Oct 2017, David Feuer wrote:<br clear="none"><br clear="none">> I would imagine<br clear="none">> <br clear="none">> ordNub :: (Foldable t, Ord a)<br clear="none">>        => t a -> [a]</div><br clear="none"><br clear="none"><br clear="none">The kind of generalization where the input is Foldable but the output is <br clear="none">just a list looks pretty unnatural to me. I think it means that we still <br clear="none">do not have the proper generalization that allows us to define<br clear="none"><br clear="none">   ordNub :: (??? f, Ord a) => f a -> f a<br clear="none"><br clear="none">I would just leave it as ordNub :: (Ord a) => [a] -> [a]</div><div class="ydpa0f7d8b6yqt7100988427" id="ydpa0f7d8b6yqtfd23098">_______________________________________________<br clear="none">Libraries mailing list<br clear="none"><a shape="rect" href="mailto:Libraries@haskell.org" rel="nofollow" target="_blank">Libraries@haskell.org</a><br clear="none"><a shape="rect" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="nofollow" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br clear="none"></div></div>
                </div>
            </div></div></body></html>