Closed pboyer closed 7 years ago
Ping @ke-yu
We probably should exclude Concat()
as it is not well defined. As a list in DS could be a dictionary, if concatenating two dictionaries have same keys, the operation fails or one of value is overwritten?
LGTM
Good point.
It should be said that Append
, Remove
, and Insert
suffer from the related issues. That is, they assume the underlying data structure is a list in their type annotations or don't clarify the semantics in the two cases.
Why not generalize these to the dictionary case, rather than expecting int
arguments? This could be considered "javascript" style.
I'll give this some more thought tomorrow. It's late now. :P
PTAL @ke-yu
Mainly, this PR removes built-ins that would make more sense in the
List
package.It also adds an
Append
method.