3 ms·
I’d love an example if you have one. I’ve used assertions lots as guards or pre-condition checks on entering the function but never right before returning.
by darwingr 6y ago
I’d love an example if you have one.
I’ve used assertions lots as guards or pre-condition checks on entering the function but never right before returning.
- augustk 6y agoA complicated sorting algorithm could assert that the result is sorted before returning.