Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个列表,例如:
L1=[1,0,1,0,1,1] L2=[2,3,4,2,1,1]
我想检查这样的事情
if (L1[k]==0) sum=L2(k)
有没有办法使用prolog来做到这一点?
nth0(Ind, Lst, Elem) enables random access to the list elements under SWI-Prolog