object assign, array flatten
frsechet opened this issue · comments
Is your feature request related to a problem? Please describe.
Merging objects and flattening arrays is a bit difficult in CSML. Simple built-in methods to perform these actions would be great.
do someobj = { "tata": 1 }
do newobj = someobj.assign({ "toto": 123}) // => { tata: 1, toto: 123 })
do somearray = [[4, 5], [6, 7]];
do newarray = somearray.flatten() // => [4, 5, 6, 7]