i realy need help with this assignment that goes as follow: i need to implement this function using map family.
mapSub(List1,List2).
Subtracts List2 from List1
Follows the order of appearance in
List2.
Implement it using map family
Examples:
mapSub([1,2,3,4,5,1,2,3,4,5],[1,1,2]).
[2,3,4,5,3,4,5]
mapSub ([1,2,3,4,5,1,2,3,4,5],[1,1,2,2]).
[2,3,4,5,3,4,5]
the problem is how can i menage List2 with the functions i allowed to use,
for exmple if i find the first element from List2 and delete his first appearance in List1.
how can i replace the element i look for
to the head of List2 tail ( the next element in List2)
thank you.