? 'm writing this again, because noone noticed, probably because I had one reply by myself, because I had made a mistake. So, if you haven't seen, it, please answer me my questions. Thanks.
"Hello everyone,I have to write two programms with lists, with two arguments. In the first programm the first argument (list) must lead the second (list) and in the second programm the opposite. I don't understand the theory very well, when I have news I'll inform you, unless you understand it first, but I made a programm which I don't know what exactly does. It's the following:
leading_list([],Y).
leading_list(Head|X1,Head|Y1):-leading_list(X1,Y1).
I thought I had understood what leading means, but now I know I haven't.Can anyone tell me what this programm does, and give me an idea how the programm for example (programm)1 should be? Unless you don't understand it and I will explain it to you when I find out. Thanks.
"Hello everyone,I have to write two programms with lists, with two arguments. In the first programm the first argument (list) must lead the second (list) and in the second programm the opposite. I don't understand the theory very well, when I have news I'll inform you, unless you understand it first, but I made a programm which I don't know what exactly does. It's the following:
leading_list([],Y).
leading_list(Head|X1,Head|Y1):-leading_list(X1,Y1).
I thought I had understood what leading means, but now I know I haven't.Can anyone tell me what this programm does, and give me an idea how the programm for example (programm)1 should be? Unless you don't understand it and I will explain it to you when I find out. Thanks.