domains
x = integer
l = integer*
predicates
concatenate(l,l,l)
shift_left(l,l)
clauses
concatenate([],List,List).
concatenate([X|List1],List2,[X|List3]) :-
concatenate(List1,List2,List3).
shift_left([X|Tail],List) :-
concatenate(Tail,[X],List).
Output :
Goal: shift_left([1,2,3,4],List)
List=[2,3,4,1]
1 Solution