[Haskell-cafe] 'Associative' order of calling

Charles Durham ratzes at gmail.com
Fri Oct 23 16:07:57 UTC 2015


I can think of a few properties that folds can honor:

1. Promises to call f on all data (does not have any guarantees on order)
2. Promises to call f on all data in order (like a left fold)
3. Promises to call f "associatively" (perhaps can be formalized as an in
order break down of the data into tree structures)

I'm assuming at least #1 has a well known name (something completeness?)

On Fri, Oct 23, 2015 at 11:49 AM, Tom Ellis <
tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk> wrote:

> On Fri, Oct 23, 2015 at 11:45:13AM -0400, Charles Durham wrote:
> > Let's say you have a function "thisFold :: (a -> a -> a) -> [a] -> a"
> >
> > and it says that the function 'f' passed in must be associative.
> >
> > Then it goes on to use f in "thisFold f [0,1,2]" like "f (1 (f 0 2))".
> > Obviously f is still associative, but 'thisFold' did not call f
> > 'associatively' on the data. My question is if there is a name for what
> > property this broke by not calling f 'associatively'.
> >
> > Does that make sense?
>
> I don't think it makes sense.  You're asking whether there's a *name* for
> the property it broke, but is there even a property it broke at all?  If
> so,
> can you write the property down (without naming it)?
>
> Tom
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151023/0ad3f6ce/attachment.html>


More information about the Haskell-Cafe mailing list