how complicated can EOS get?
Posted: Sat Dec 18, 2021 7:00 am
I just tried to throw some array code at EOS and it seems to error out in the init. this is all I've put so far:
const Struct = (...keys) => ((...v) => keys.reduce((o, k, i) => {o[k] = v[i]; return o} , {}));
const unit = Struct('lookup1','lookup2','rank1','rank2');
I admit, there's a lot going on there. should I try to shy away from using dot notation in my arrays or should this kind of stuff work and my error is somewhere north of this?
const Struct = (...keys) => ((...v) => keys.reduce((o, k, i) => {o[k] = v[i]; return o} , {}));
const unit = Struct('lookup1','lookup2','rank1','rank2');
I admit, there's a lot going on there. should I try to shy away from using dot notation in my arrays or should this kind of stuff work and my error is somewhere north of this?