I tried to define the following function but failed. Any suggestions will be welcome.
H = list()
H[[1]] = function(x) 1
for(i in 2:4) H[[i]] = function(x) H[[i-1]](x)*x+1
> H
[[1]]
function (x)
1
[[2]]
function (x)
H[[i - 1]](x) * x + 1
[[3]]
function (x)
H[[i - 1]](x) * x + 1
[[4]]
function (x)
H[[i - 1]](x) * x + 1
> H[[1]](1)
1
> H[[2]](1)
Too Deep Nesting