I am not from a computer science background and I am also new to NetLogo, so I would really appreciate your help. My question is as follows:
Let assume that I have a list of three lists
Let mylist [ [ 1 2 3 4 5 ] [ 2 2 2 2 2 ] [ 3 3 3 3 3 ] ]
I would like to check each item within item 2 mylist
(i.e. [ 3 3 3 3 3 ]) and see if it is not equal to the corresponding item in item 0 mylist
(i.e. [ 1 2 3 4 5 ]). If that the case, I would like to subtract a constant value which is 5 from that item in item 2 mylist
.
In other words, I would like mylist to be changed to the following:
[ [ 1 2 3 4 5 ] [ 2 2 2 2 2 ] [ -2 -2 3 -2 -2 ] ]
Thanks in advance,