计算机代写 CS262 Logic and Verification Prolog 3: Lists – cscodehelp代写
CS262 Logic and Verification Prolog 3: Lists
CS262 Logic and Verification 1 / 2
Lists in Prolog
Copyright By cscodehelp代写 加微信 cscodehelp
List notation [a,b,c]
Lists in lists [a,b,[c,d,e]]
Access first element of list and the rest by [Head|Tail] Can be iterated: [H1,H2|Tail]
Placeholder for arbitrary expression:
Test membership: member(El,List)
Get nth entry (1-based): nth1(Idx,List,El)
Prolog cut operator: !
CS262 Logic and Verification
程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com