I'm not sure I understand your question. Are you saying that f is a function from A to B, that A contains the single member "u", B contains the single member "8" (or possibly "g"?) and f(u)= 8? If so, it is both "injective" and "surjective". It cannot be a "constant" function since f(u) is not u.