f <- function(n) {
	if (n == 1)
		return(1)
	else
		return(2 * Recall(n - 1) + 1)
}

f(3)
hanoi <- f	# A függvény "átnevezése"
rm(f)
hanoi(3)

ackermann <- function(m, n) {
	if (m == 0)
		return(n + 1)
	else if (m > 0 && n == 0)
		return(
			Recall(m - 1, 1)
		)
	else if (m > 0 && n > 0)
		return(
			Recall(
				m - 1,
				Recall(m, n - 1)
			)
		)
	stop("Should never get here")
}

ackermann(3, 3)

temp <- outer(0:3, 0:3, Vectorize(ackermann))
dimnames(temp) <- list(0:3, 0:3)
temp
