I am trying to append list1 to list2 without using append method in prolog. i have searched for it on google but i can't find any solution to do that. Is it possible or not? I have tried it by myself but i can't do it. Here is what i am doing...
apnd(X,[],X). //Stop condition when second list is empty loop will be stopped.
apnd(X,[H|T],R):-//now here i have to append H to X but for this i have to use append method. i don't want to use this.
//After this i will remove H from second list and loop again for remaining list.
If it's possible to do this without append() method how can i do that?
UPDATE
Reason for not to use append() method
I am engineering student and i am referring past years question papers for my exam preparation and in that they have asked that question. Also after reading that question, i am curious to know this that is it really possible? and if yes then how?. So, i have asked this question here because i didn't find solution or any hint from any of my books or from google.