tuples_in/2 now works
This commit is contained in:
@@ -4295,12 +4295,14 @@ tuples_in(Tuples, Relation) :-
|
||||
relation_tuple(Relation, Tuple) :-
|
||||
relation_unifiable(Relation, Tuple, Us, _, _),
|
||||
( ground(Tuple) -> memberchk(Tuple, Relation)
|
||||
; tuple_domain(Tuple, Us),
|
||||
; phrase(tuple_domain(Tuple, Us), _),
|
||||
( Tuple = [_,_|_] -> tuple_freeze(Tuple, Us)
|
||||
; true
|
||||
)
|
||||
).
|
||||
|
||||
list_first_rest([L|Ls], L, Ls).
|
||||
|
||||
tuple_domain([], _) --> [].
|
||||
tuple_domain([T|Ts], Relation0) -->
|
||||
{ maplist(list_first_rest, Relation0, Firsts, Relation1) },
|
||||
|
||||
Reference in New Issue
Block a user