I have a list with four values in it. I have then created an array made up of four 1's with their probabilities:
set startingcharact (list pricered qualityred innovationred sustainabred)
set probs-impr-red [[1 0.1] [1 0.1] [1 0.3] [1 0.5]]
Basically what I want is to "update" the startingcharact list by adding the 1 chosen with the specific function of the rnd extension to the characteristic with the same index. So for example, if the first 1 of the list is chosen, i want to have: pricered + 1.
I tried to do this with the map function but I obviously get an error because I am trying to sum a list with a single value. Here what I have done:
set startingcharact (map + startingcharact first rnd:weighted-one-of-list probs-impr-red last)