I’m new to Prolog and stuck on some programming homework. one of them should work like this:
myDel(1, [1, 2, 1, 3, 1, 4], M).
the result should be:
M = [2, 3, 4].
to solve this, one can only use append recursively and can not use the built-in delete.
Can somebody help?
I must say that it’s quite difficult to help without just spoon-feeding you the answer. Prolog is a bit like that. Here’s a partial answer that hopefully doesn’t give too much away: