List-in-List membership

Prolog has a predicate member, which checks if an item is in a list, but what if you want to know if multiple elements are part of a list.

%is elems from Lst1 also elems of Lst2
members(Lst1,Lst2) :- maplist( \X^(member(X,Lst2)), Lst1).

example use, but as you see it needs the lambda module :

?- use_module(library(lambda)).
?- members([3,4],[1,2,3,4]).
true .

?- members([3,4,5],[1,2,3,4]).
false.

Just found out you can get similar results with subset, but

The library(lists) contains a number of old predicates for manipulating sets represented as unordered lists, notably intersection/3union/3subset/2 and subtract/3. These predicates all use memberchk/2 to find equivalent elements. As a result these are not logical while unification can easily lead to dubious results.
…..
deprecated: New code should use library(ordsets) instead.