>>13957078Think of a function as a sequence of reals indexed by a real parameter (akin to a real in [0,1) as a sequence of bits indexed by a natural number parameter).
The regular cantor argument is to assume there exists a surjective function F from N to (f from N to {0,1}).
It then constructs an f that isn't hit by F by making the nth bit of f, f(n), disagree with the nth bit of F(n), F(n)(n).
This is easily done by making f(n) = F(n)(n) + 1 (mod 2)
The same process works in OP's case by constructing an f such that the rth output of f, f(r) disagrees with the rth output of F(r), F(r)(r).
f(r) = F(r)(r) + 1 works but you could choose any non-zero g(r) instead of just 1.