title: Logically Handling Lists
body: <p>I have a large number of facts within my program, listing developers and designers in a company, as well as previous projects, like so..</p>
  
  <pre><code>% project(Project Name,Year)
  project(efnet, 2007).
  % designer(Project Name, Name, Role)
  designer(efnet, jane_cole, lead).
  % developer(Project Name, Name, Role)
  developer(efnet, alex_tobbs, architect).
  </code></pre>
  
  <p>I have also build a definition that displays a list of either designers or developers working on a project </p>
  
  <pre><code>% employees(Single Project, List of Employees
  employees(Project, E)
  </code></pre>
  
  <p>What I want is to create a new definition that take a list of either designers or developers and displays a list of all the project titles they have BOTH worked on (P); like so..</p>
  
  <pre><code>% projects_of_all(List of Staff, List of Projects)
  projects_of_all(S,P):- ...
  </code></pre>
  
  <p>I can do this easily with findall (or bagof) if I have to find the movies of a single person, but I am not sure how I would do this with a list of the employees. Can someone give me a helping hand with this?</p>