Accessors.jl
Accessors.jl copied to clipboard
insert at named location (PropertyLens)
I am wondering if inserting an element c = 3 into (a = 1, b = 2), so that the result is (a = 1, c =3, b = 2), is possible with this package.
@insert x.c = ... will always insert last.
This functionality definitely isn't currently available in Accessors. What would be your ideal API? And I'm personally curious what's your usecase :) Typically, one either has a number-indexed collection like tuple/vector, or name-indexed like namedtuple/dict. When both aspects are important?