如何编写prolog程序将列表分成两个列表
问题描述:
给出一个名为dividelist(List,List1,List2)的关系的定义,以便List的元素在List1和List2之间分区。
例如 - dividelist ([a,b,c,d,e],[a,c,e],[b,d])
Give the definition of a relation called dividelist(List,List1,List2)so that the elements of List are partitioned between List1 and List2.
e.g - dividelist( [a,b,c,d,e], [a,c,e], [b,d])
答