I recall this pattern being taught in my first year or two of my computer science degree. Emphasizing only one return statement per function, utilizing a shared return variable.
I much preferred (and still greatly prefer in industry) the pattern of exiting the function as soon as possible.