i have two vectors, say a <- 1:10 and b <- a^2
i would like a vector d containing : runif(1,1,1) as first element runif(1,2,4) as second element runif(1,3,9) as third element
i have tried a fonction : myalea <- function(u,v){return(runif(1,u,v))
but i can"t manage to apply it to vectors

i have done the job using the lentgh of the vectors and a loop but i wonder if there is something more "R"

the idea is to create alea distributions between two distributions
for example x <- runif(1000,1,10) y1 <- 2*x^2 y2<- 2.3*x^2
and y "between" y1 and y2

thanks
ok
so…
your answer shows me that there is no native R instruction for that
i guess \ should be a lambda function
and that map2_dbl applies this function to some vectors

so, thanks for the answer
would you have a website explaning a bit theorically why R cannot natively do it ?