when I call in R
l <- list()
for (i in 1:4) {
l[[i]] <- function(x) exp(i*x)
}
in each entry of the list, one can find the output
function(x) exp(i*x)
But what I want is, that I get when calling l[[1]] the output
function(x) exp(1*x)
when I call l[[2]] the output
function(x) exp(2*x)
and so on. Is there a possibility to code this in R? Thank you in advance!