I have 2 lists [x1, x2, ...xn] and [y1, y2, ...yn] of the form {0, 1}^n.
I want to generate a new list [a1, a2 ... an] such that ai = xi AND yi for every i from 1 to n (i.e., if x1 = y1 = 1 then a1 = 1 or if x1 = 1, y1 = 0, then a1 = 0)
How can I implement a predicate using recursion?
Use clpb and meta-predicate
maplist/4together with Prolog lambdas like this: