[mercury-users] undefined symbol `::/2'.

Richard A. O'Keefe ok at atlas.otago.ac.nz
Mon Jul 23 12:37:27 AEST 2001


"Matthews, John" <John.Matthews at compaq.com> wrote:
	:- pred between(int,int,int).
	:- mode between(in,in,in) is semidet.
	:- mode between(in,out,in) is multi.
	
As the original inventor of between/3, I should point out 
that the standard interface for between/3 in Prolog is

	between(Lower_Bound, Upper_Bound, I)

Amongst other things, this meant that between(0,N) could be passed
around usefully as a closure in Prolog.  While that advantage does
not apply to Mercury, there doesn't seem to be any advantage to be
gained by changing the argument order.

--------------------------------------------------------------------------
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