Question: (a) Define the PROLOG predicate split(L,P,N) that splits a list of integers into two lists: one containing the positive ones (and zero), the other containing

(a) Define the PROLOG predicate split(L,P,N) that splits a list of integers into two lists: one containing the positive ones (and zero), the other containing the negative ones. Example: split(13,4,-5,-1,0,4,-9],P,N) P [3,4,0,4] N [-5,-1,-9]. (a) Define the PROLOG predicate split(L,P,N) that splits a list of integers into two lists: one containing the positive ones (and zero), the other containing the negative ones. Example: split(13,4,-5,-1,0,4,-9],P,N) P [3,4,0,4] N [-5,-1,-9]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!