title: Make a list of distances from turtle to patches in Netlogo
body: <p>I'm trying to ask turtles called "mosqs" to create a list of the distances to the patches within particular radius of them so that I can eventually use that info in a probabilistic function. However, I can't seem to figure the distance part out. First, I create a variable called "nearby" that identifies the patches within a radius of an agent set. Next, I create lists of both the x and y coordinates. My latest approach has been to try to create a list called "dist" that asks the patches within the agentset to print out their distances from the location of the turtle ("self"). The code below gives me the "Expected reporter" error and I'm not sure why. I've tried various things as well, such as using the x and y coordinate lists with the distancexy command, but I just can't seem to get it to work. Any suggestions?     </p>
  
  <p>Thanks,</p>
  
  <p>Dan</p>
  
  <pre><code>ask mosqs [ 
  
  let nearby patch-set patches in-radius 2 
  let xs [pxcor] of nearby  
  let ys [pycor] of nearby 
  let dist (list (ask nearby[ print distance self]))
  </code></pre>