function type inferences from returns
function type inference from return values