Basic inference of function return types