Our friend the list
?- append([1,2,3],[4,5],L). L=[1,2,3,4,5]
?- append([1,2],M,[1,2,3]). M=[3]
?- append(A,B,[1,2]). A=[], B=[1,2]
A=[1], B=[2] A=[1,2], B=[]
append works in multiple directions!
Previous slide
Next slide
Back to first slide
View graphic version