3 ms·
Yes, the second case is a bug in the interface. For the first case you have it the wrong way around. My generic code would work on things that are not numbers
by Certhas 2y ago
Yes, the second case is a bug in the interface.
For the first case you have it the wrong way around. My generic code would work on things that are not numbers but I prevent you from calling it because I didn't anticipate that there would be things you can add that are not numbers. (Better example: require an array when you really only need an iterable).