This question already has an answer here:
- Prolog list of lists get all elements 1 answer
How to return all the elements of a list of lists in Prolog:
That's my code:
treturn_list_members([[Head|_]|Lists], Head).
treturn_list_members([[_|T]|Lists], Head):- return_list_members([T|Lists], Head).
When I execute, it only return the elem of the first list.
?- treturn_list_members([[12,3],[45,6],[11,90]],L).
L = 12 ;
L = 3 ;
false.