0

I guess this should be really stupid, but I'm currently doing it this way:

array = [[[array rac_sequence] map:^id(id value) {
    return [array indexOfObject:value] == indexToChange ? newValue : value;
}] array];

But I'm sure there should be a better why to accomplish this, right?

Many thanks in advance.

1 Answers1

1

If you're both starting and ending with an array, I'd just turn it into a mutable array and mutate it that way.

joshaber
  • 2,465
  • 20
  • 13