I am really new in prolog programing and I can just ask simple questions.
I want to rotate lists to left in prolog like following:
rotatelist([1,2,3,4],R)
R=[2,3,4,1]
I tried the following code:
rotatelist([],[]).
rotatelist([H1|T1],[H2|T2]) :- rotatelist(H1,T2).
Something like this ought to do the trick: