i have predicate has following format: pilot( id1, id2 ). i'm searching multiple values pilot , im able predicate findall, how can go there , use new predicate create list this: [ pilot( id1, id2 ), pilot( id1, id2 ), pilot( id1, id2 ), pilot( id1, id2 ), ... ]. [clarification] i this: ask id of flight: id and this: findall( flights( pilots ), flight( id, pilots, _, _, _, _), xs). and this: xs = [ flights( 1, 2 ), flights( 4, 7 ), flights( ... ), ... ]. i take information , find resulting pilots associated id of flights. can each pilot , i'm able write() them, problem iss, have multiple same pilots, because of multiple flights, want put of pilots, have structure: pilot(id,a,b,c,d,e), , put of them in list this: xa = [ pilot(id,a,b,c,d,e), pilot(id,a,b,c,d,e), pilot(id,a,b,c,d,e), ... ] can remove duplicate entries. the input format of problem not clear. if have 1 predicate each flight-pilot pair, do: % flight(id, pilot) flight(1, 100). flight(...