title: Netlogo: Edit link attribute based on lists of linked agents
body: <p>I have a model with banks. Each bank is linked to all other banks by a special breed of undirected link called &quot;riskshares&quot;. Each bank also has links to other types of agents.
  Each bank has a list of countries where it operates. The list is called &quot;op-countries-list&quot;, which does not have a fixed length, and both its length and countries are randomly picked. For example, one bank might have &quot;op-countries-list&quot; of length 5 = &quot;Australia, Italy, Spain, Canada, Brazil&quot;, and another bank might have &quot;op-countries-list&quot; of length 2= &quot;Italy, France&quot;.
  Now: I need to change to &quot;TRUE&quot; one boolean attribute of the &quot;riskshare&quot; link, depending on whether there is one common country in the &quot;op-countries-list&quot; of the two banks linked by the &quot;riskshare&quot;.</p>
  <p>I have (among other things):</p>
  <p>banks-own
  [op-country-list]</p>
  <p>riskshares-own
  [same-country-op?]</p>
  <p>And I am trying this approach:</p>
  <p>ask banks
  [
  foreach op-country-list
  ifelse member? op-country-list of other-end
  [set same-country-op? of my-out-riskshare true]
  ]</p>
  <p>With this, I get an &quot;OF expected input to be a reporter&quot; error. I think I should come up with a to-report procedure and then use it, but I am not sure how to do it in this case. In addition, I am not sure how to specify that I want other-end to look into the &quot;riskshare&quot; kind of link, and not all other links that the bank has.</p>
  <p>Do you have any suggestions?</p>