enricopolanski/functional-programming

Fixing sentence "Please note that in order for f and g to combine, the domain of f has to be included in the codomain of g"?

SHND opened this issue · 2 comments

SHND commented

Looking at the sentence:

Please note that in order for f and g to combine, the domain of f has to be included in the codomain of g.

Shouldn't it be:

Please note that in order for f and g to combine, the codomain of g has to be included in the domain of f.

That way for any possible input x then there is an element g(x) is domain of f. (Codomain of g has fewer or equal number of elements than domain of f)

@SHND

I think this is correct, because the codomain (or image or results) of g(x) will provide the arguments of f.

h(x) = f(g(x))

Does it checks?

SHND commented

You are right. 👍