What happens when a function's input is a different type than the output?

The function works, the input can be a different type compared to the outputIt won't work, the input and output have to be the same type

The function works, the input can be a different type compared to the output.