Hello, everyone. This is my first post in this fantastic community.
I have the following database:
student(cristian, spanish).
student(maria, english).
student(felipe, italian).
student(juan, spanish).
studies(cristian, english).
studies(cristian, portuguese).
studies(maria, hebrew).
studies(juan, english).
studies(wendy, hebrew).
I would like to know if every student whose is a native speaker of X studies the language Y.
I would expect to bind results to variables in the query, something like:
?- foreach(student(S, X), studies(S, Y)).
I would appreciate any insights. Perhaps, I am not using the correct predicate.