I need to define divide so that List [1,2,3,4,5]
divides into:
a = [1,2,3}
b = [4,5]
I\'m getting an error that says \"
Surely the effect of this code (lengthIs(L2, M) < lengthIs(L1,N)/2 -> ...
) isn't what you expect: it doesn't compare numbers, but terms. You should write it this way:
lengthIs(L2, M), lengthIs(L1, N), M < N/2 -> ...
Another typo like mistake: the first clause of lengthIs/2 should read
lengthIs([],0).