Question: How do I manipulate lists of sets? - search/occurrences

Hi,

 

I have a list of sets eg. L:=[{a},{b,c},{d,a,f},{b,d}] and I'm having problems doing operations on it. 

I want to be able to take the first element (a here), look for the next occurrence of it and return what is in the set with it (here d and f).

However I can't seem to use Search or Occurrences as they consider the sets themselves to be the elements. For instance Search(a, L) returns 0. 

 

What can I do?

Thank you!

Please Wait...