[mercury-users] Is "High order predicates" realy high order?

Mike Potanin potanin at mccme.ru
Fri Nov 22 02:09:00 AEDT 2002


On Fri, 22 Nov 2002, Fergus Henderson wrote:

> On 21-Nov-2002, Mike Potanin <potanin at mccme.ru> wrote:
> >
> > Do Mercury have syntax for pred it return another pred?
>
> Yes.  See the "Higher-order" chapter of the Mercury language reference manual.
Thank you!
I have not read up up to this place.

>
> > Can I write?
> > :-pred pp(pred (pred (X), pred (X))).
> > :-mode pp(pred((pred (in) is det), (pred (out) is det)) is det) is det.
>
> To make it parse correctly, you need to delete the space between "pred"
> and the immediately following "(":
Thanks yet.
>
> :- pred pp(pred(pred(X), pred(X))).
> :- mode pp(pred((pred(in) is det), (pred(out) is det)) is det) is det.
>
>

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list