List of Numbers

Hello guys!

Does anyone know why it seems impossible to add 2 exact same numbers to a list of numbers?

Thanks a lot.

My guess is that the list is treating the two numbers as being the same (not in value, but as the same object) and the list can only contain one copy at most of any object. If thatā€™s the case, a workaround is to store the number in itā€™s own ā€˜thingā€™ and then maintain a list of those ā€˜thingsā€™. Itā€™s more overhead than you probably would like, but it should work.

Yes, @Scott 's answers to both (the reason and the workaround) are right. Weā€™ll fix this at some point, but in the meantime, thatā€™s a good workaround.

@emmanuel @Scott Thanks!

1 Like

Is this going to be added so that ā€œlist of numbersā€ doesnā€™t throw out repeat numbers?