I think your base case is OK
The next line needs squared brackets to make it a list format.
The third line - you should not mix lists [H|T] with non-lists H,T. The third line also needs reworking. You could look at using the "member" predicate to look for duplication.
Cheers
John
OK thank you.I don't see what your problem is ; perhaps I am missing something.
You have a fact that says
multLista([],1).
then you ask
multLista([],R) ?
and it says R = 1.
Why is that a surprise?
Regards
John
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.