[m-users.] More modes for map.map_foldl

Volker Wysk post at volker-wysk.de
Tue Dec 2 16:00:03 AEDT 2025


Am Dienstag, dem 02.12.2025 um 15:13 +1100 schrieb Julien Fischer:
> Hi Volker,
> 
> On Tue, 2 Dec 2025 at 05:25, Volker Wysk <post at volker-wysk.de> wrote:
> > 
> > Could you (the Mercury Team) provide more modes for map_foldl, for the
> > case
> > when the inner predicate is cc_multi? For my case, it should look like
> > this:
> > 
> > :- mode map_foldl(in(pred(in, in, out, di, uo) is cc_multi), 
> >                   in, out, di, uo) is cc_multi.
> > 
> 
> 
> I will add this.  Are there any others that you specifically need?

Not at the moment. 

> 
> > There are also a lot more predicates which should updated this way as
> > well.
> > 
> 
> 
> Adding every possible mode for some of these higher-order predicates will
> increase the size of the library; generally we only add them as required.

But there are predicates, which are similar to map_foldl. Such as map_foldl2
or map_values_foldl. Maybe they should get the additional modes, too...

Cheers,
Volker


More information about the users mailing list