I need to define divide so that List [1,2,3,4,5] divides into:
[1,2,3,4,5]
a = [1,2,3} b = [4,5]
I\'m getting an error that says \"
\"
No need to check sizes. Just do it like this:
div([],[],[]). div([A],[A],[]). div([A,B|T],[A|X],[B|Y]) :- div(T,X,Y).