If areVariablesMutable is false, only the (outer) variables in this list can be modified inside the lambda.