The McCarthy Function is the following:
$M\left(n\right)=\left\{n-10\:\:\:\:\:\:if\:n\:>100\:\right\}$
and
$M\left(n\right)=\left\{M\left(M\left(n+11\right)\right)\:\:\:if\:n\:\le 100\:\right\}$
For any integers $n\:\le 100$, $91$ is returned. It's a neat function. Is there a way to adjust it so that it works with other numbers (i.e. for any into up to upper bound $r$, $M()$ returns $k$)?