[mercury-users] list rotation in Mercury

Ralph Becket rbeck at microsoft.com
Mon Jul 16 18:49:44 AEST 2001


> From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> Sent: 14 July 2001 04:41
> 
> On 13-Jul-2001, Terrence Brannon <tmbranno at oracle.com> wrote:
> >
> > rotall( [] , A , []).
> > rotall([H|T], A, [L|Z]) :-
> > 	     append([H|T], A, L),
> > 	     append(A,[H], A1),
> > 	     rotall(T, A1, Z).
> 
> I don't have a copy of "Clause and Effect", I'm afraid,
> I have trouble seeing how this example uses difference structures.
> Normally difference lists are used to *avoid* calls to append/3.

I proof-read Clause and Effect and had a minor run-in with Clocksin
over what constitutes a difference structure: his point of view was
that any use of an accumulator counted as a difference structure...
This is not the definition I would use and I can't recall coming
across its use elsewhere.

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