title: NETLOGO: adding lists of agents' attributes to a list of lists
body: <p>Hello I am using Netlogo and I am trying to create a list of lists in which every sublist is a couple of agents' attributes. In particular I declare the list as a global variable and I initialize it to an empty list. Then I ask every agent to add a list of their attribute_1 and attribute_2 to the main list. Like this:</p>
  
  <pre><code>globals[mainlist]
  set mainlist []
  ask agents[
  set mainlist sentence [mainlist] [attribute_1 attribute_2 ]
  ]
  </code></pre>
  
  <p>This should create a new list composed by the previous mainlist and the list [attribute_1 attribute_2].
  Unfortunately this doesn't work and I get the error: EXPECTED LITERAL VALUE referring to "mainlist".
  How should I write my code to create my list of lists in the correct way?</p>