[mercury-users] A suggestion for a tutorial

Peter Schachte schachte at csse.unimelb.edu.au
Tue Jul 4 10:20:46 AEST 2006


On Tue, Jul 04, 2006 at 10:07:16AM +1000, Peter Schachte wrote:
> You might write:
> 
>     square_list(0, _, []).
>     square_list(N, M, [X|L]) :-
>         N>0, member(X, 1 .. M), square_list(N - 1, M, L0).

Oops, change L0 to L.

-- 
Peter Schachte              I do not feel obliged to believe that the same
schachte at cs.mu.OZ.AU        God who has endowed us with sense, reason, and
www.cs.mu.oz.au/~schachte/  intellect has intended us to forgo their use.
Phone: +61 3 8344 1338          -- Galileo Galilei 
--------------------------------------------------------------------------
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