NetLogo has a primitive for what is called n-values. Very simple:
n-values 10 [ ? + 1 ]
will give you a list:
[1 2 3 4 5 6 7 8 9 10]
But there are many other neat things you can do with help n-values. You should take a look at the documentation .
Update:
NetLogo 6.0 now has a rangeprimitive that can be used for the same purpose:
observer> print (range 1 11)
[1 2 3 4 5 6 7 8 9 10]
source
share