in scala, if I have a list of objects, and one is mutable, and I call a function which…
- User
in scala, if I have a list of objects, and one is mutable, and I call a function which changes the mutable one, in a mapped way on the list like this:
val output = listOfResults.map(x => function(x.toList, mutableThing))
where each call of function changes mutableThing, will the calls of function on all the elements of listOfResults be executed in the same order as the elements appear in the list, or will it be parallelized such that some calls might be executed out of order?
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.