[swift-users] edit array

J.E. Schotsman jeschot at xs4all.nl
Wed Apr 26 09:47:53 CDT 2017


On 26 Apr 2017, at 16:27, Rien <Rien at Balancingrock.nl> wrote:

> To edit the value in the array itself use:
> 
> array[index].number += 1

That requires a for loop.
Functional programming lets you write for loops more succinctly.
Why can’t $0 not be used as a reference, like array[index] ?
I've checked, it’s not among the commonly rejected proposals.

Jan E.



More information about the swift-users mailing list