I have attempted a refactoring of the calc_leaf_occurences function. I wrote some tests before starting. If those tests were enough, this refactoring should be valid, but I'm not sure. Please take your time to review this - no hurry at all. And tell me if I have introduced bugs anywhere.
I have attempted a refactoring of the
calc_leaf_occurences
function. I wrote some tests before starting. If those tests were enough, this refactoring should be valid, but I'm not sure. Please take your time to review this - no hurry at all. And tell me if I have introduced bugs anywhere.