Hi there,
I can write a predicate that is satisfied when two lists are equal e.g. equal([2,3],[2,3]) would be true and equal([2,3],[4,5]). would be false.
However, what if I want to have a list and try and match it with any list in a list of lists e.g. match([2,3],[[5,6],[4,6,2],[2,3]]). would be true because of the last list in the list of lists but match([2,3],[[3,4],[4,2,1]]). would be false because [2,3] doesn't match anything in the list of lists.
I'm thinking maybe we might need nested recursion here? Any idea how you do this? The problem I'm trying to solve is much larger but just being able to do this would allow me to solve the whole problem.
Thanks in advance.