[mercury-users] list rotation in Mercury
Terrence Brannon
tmbranno at oracle.com
Sat Jul 14 04:40:38 AEST 2001
I looked through the list library and did not see a rotate predicate
available. Per. p. 57 of "Clause and Effect", the implementation makes
us of difference structures. But recently Richard stated that
incomplete data structures were a feature of Prolog missing from
Mercury. Is this the case?
rotall( [] , A , []).
rotall([H|T], A, [L|Z]) :-
append([H|T], A, L),
append(A,[H], A1),
rotall(T, A1, Z).
--------------------------------------------------------------------------
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