3 ms·
If you feel the need to write a reverseListAndAddOneToEachElement function for your code base, it is probably because you have lots of instances of it. If you
by sbov 11y ago
If you feel the need to write a reverseListAndAddOneToEachElement function for your code base, it is probably because you have lots of instances of it.
If you have lots of instances of it, its probably because there is a higher level, domain related reason why you're doing it. Your function should be called that, not reverseListAndAddOneToEachElement.
- seabee 11y agoIME this also happens not because the function is reused, but because the programmer is trying to create functions at a 'high level of abstraction'. Usually this means one function that has a bunch of descriptively-named function calls chained together to avoid needing more than one control structure, or to hide for loops in other functions.