I have added to the title domain and codomain, to stress the difference pointed out by @egreg. (And I have also retraced my close vote. I should have read the question more carefully.) — Martin Sleziak59 secs ago
If it is closed, we might end with not very good situation that a question is closed as a duplicate of closed question. Which would be a pity - it seems that both questions have received some reasonable answers.
I think the request to close could have been prompted by what was a little bit of a heated discussion in the comments between me and @user26857. For the record, I do think these are distinct questions and are worthwhile keeping.