このディレクトリの索引 # I am trying to do some operation on the given list items and trying to declare a new list and add items to it that satisfy a certain condition. I have to call this function recursively. So, first time the list is null and i want to insert an item in it. Second time , it will have one element and adding another element makes two elements. Third time two elements are there, and add one more element and so on. # # Please help me how to declare list in prolog and addr elements to it by appending in recursive function calls addr_list(L1,L) :- addr_list(L1,,L). addr_list(,L,L). addr_list([Element|R1],L2,L) :- 条件(Element), addr_list(R1,[Element|L2],L). addr_list([Element|R1],L2,L) :- \+(条件(Element)), addr_list(R1,L2,L).