On Fri, Oct 23, 2015 at 10:26:08AM -0400, Charles Durham wrote:
> Is there a name for a fold that promises to call a function such that only
> an associative function will always return the same result. Or in other
> words, it has the property that it promises to call a function
> "associatively" on a set of data?
I am not sure I am understanding the question correctly. Every Monoid has a
single binary operation which happens to be associative and one of
the basic fold functions has signature
foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
(which does what you expect). Does that answer your question? If not,
I'd be grateful if you would provide an example.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe