[m-users.] Returning a predicate from a function

Tomas By tomas at basun.net
Fri Dec 23 03:41:04 AEDT 2022


On Thu, 22 Dec 2022 17:27:55 +0100, Mark Clements wrote:
> Tomas: your code is elegant. I understand that lists or arrays would
> be quite suitable for the given example -- but my motivating case is
> for doing bag aggregates on (nondet) relationships


Ok (I found solutions/aggregate now also), but I doubt you actually
want nondet in the Mercury sense. If you are going to get the data
from files, as the term CSV suggests, then they cannot be a
multi/nondet predicate as shown on that web site. They will have to be
in a data structure that you maintain yourself.

/Tomas


More information about the users mailing list