[m-rev.] Bug in API documentation

Volker Wysk post at volker-wysk.de
Tue Nov 11 17:24:06 AEDT 2025


Hi, Julien

Am Dienstag, dem 11.11.2025 um 09:38 +1100 schrieb Julien Fischer:
> Hi Volker,
> 
> On Mon, 10 Nov 2025 at 18:07, Volker Wysk <post at volker-wysk.de> wrote:
> 
> > In the documentation of the multi_map module is this:
> > 
> >     % If the multi_map has an entry for the given key,
> >     % succeed once for each of the corresponding values.
> >     % Otherwise, throw an exception.
> >     %
> > :- func lookup(multi_map(K, V), K) = list(V).
> > :- pred lookup(multi_map(K, V)::in, K::in, list(V)::out) is det.
> > 
> > The comment doesn't match the declaration.
> 
> Thanks for reporting that. It's a copy-and-paste error. That's the
> documentation
> for nondet_lookup/3 directly below.  (The same thing occurs in the
> one_or_more_map
> as well.)

I'm missing in multi_map (and one_or_more_map) a method of getting all the
values corresponding to a key, which returns an empty list, when there are
none, instead of failing or throwing an exception.

Cheers
Volker


More information about the reviews mailing list