Closed zenparsing closed 7 years ago
It seems of minor importance that it work the same. I couldn't figure a clean way to do it with the factoring I have now.
I can do this by having FlattenIntoArray create an array if one isn't passed into it, but then it would have to return an array or next index, or a tuple of both. Who can think of a better way? :-P
In both of the places you're calling FlattenIntoArray
, you're just creating the array at the outset. What if FlattenIntoArray
took O
and len
, and created/returned the new array itself?
For the existing array methods, we get the "length" property of the source (which could fail) before creating the target array. Should it work the same here?