Defined function foo with an early return in addition to last line return