[m-users.] Recursive tabled predicates with aggregates / default compare
Julien Fischer
jfischer at opturion.com
Fri Aug 13 23:49:52 AEST 2021
Hi Mark,
On Fri, 13 Aug 2021, Mark Clements (gmail) wrote:
> I have also been looking at the RosettaCode task
> https://rosettacode.org/wiki/Merge_and_aggregate_datasets for Mercury. I have
> an implementation here:
> https://github.com/mclements/rosetta/tree/main/Merge_and_aggregate_datasets.
> Interestingly, the dates need to also allow for missing values. As a
> question: if maybe_date is defined as
>
> `:- type maybe_date ---> date(year::int, month::int, day::int); no.`
>
> what is the default definition for
> `compare(Compare,date(Y1,M1,D1),date(Y2,M2,D2))`?
It is described in section 3.5 of the reference manual:
<https://mercurylang.org/information/doc-latest/mercury_ref/The-standard-ordering.html#The-standard-ordering>
Julien.
More information about the users
mailing list