<div dir="ltr">Basically you want to force an argument to be associative yes?<br><br>I don't think there's a way to do that in Haskell, but what you could do is create a datatype:<div><br></div><div>data Associative a b = Associative (a -> b)<br><br>You could then make "Associative" a Category, or perhaps even an Arrow, so you could combine Associative functions to make new Associative functions. </div><div><br></div><div>But it would still be up to the user to ensure they only promote actual associative functions to "Associative". </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 24, 2015 at 8:24 AM, Bardur Arantsson <span dir="ltr"><<a href="mailto:spam@scientician.net" target="_blank">spam@scientician.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/23/2015 06:07 PM, Charles Durham wrote:<br>
> I can think of a few properties that folds can honor:<br>
><br>
> 1. Promises to call f on all data (does not have any guarantees on order)<br>
<br>
</span>"Exhaustive"?<br>
<br>
... but then that's not really observable in a language like Haskell,<br>
except if you monitor CPU heat.<br>
<br>
Regards,<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>