[mercury-users] determinism inference for higher order predicate terms

Peter Wang novalazy at gmail.com
Wed Oct 3 18:36:26 AEST 2007


On 2007-10-03, stormie at hotmail.it <stormie at hotmail.it> wrote:
> 
> What can be wrong with the following program? 
> 
...
> 
> main(!IO) :-
>     foldr(plus,[1,2,3,4],0,S),
>     io.write(S,!IO)    .
> 
> :- pred plus(int,int,int).
> :- mode plus(in,in,out).

You are missing "is det."

Peter

--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list