title: Working with index positions on a list in Netlogo
body: <p>I'm struggling with the following problem using these variables:</p>
  
  <pre><code>set variablex .5
  set threshhold-list [0 .3 .6]
  set variable-list [0 0 1]
  </code></pre>
  
  <p>I have three agenttypes 0,1,2 that correspond to the index position of threshhold-list and variable-list. So Agent 0 has threshold 0 and variable 0, Agent 1 has threshold .3 and variable 0, and Agent 2 has threshold .6 and variable 1.</p>
  
  <p>What I'd like to do is check if any agent has a threshold greater than zero and less than variablex. If so, update that agent's variable on the variable list to variablex. That is, for the variables above I'd like to run logic that produces a new variable-list like this one:</p>
  
  <pre><code>variable-list [0 .5 1]
  </code></pre>
  
  <p>But if variablex was .7, it would produce [0 .7 .7].</p>
  
  <p>I've got some code I've been hacking away at but I feel like it's way more complicated than the problem and so I'm wondering if someone could point me in the right direction. Thanks so much!</p>