Here's your function: my_func <- function(FUN){map_dbl(1:5, ~ FUN)}.
What I understand is that you expect that this function will take any function, say f as an argument and return c(f(1), f(2), f(3), f(4), f(5)). So, if you use a function that doesn't really depend its argument, it'll be same as 5 repetitions of the same function.
Is that so?
If yes, then it's not doing anything as such. It doesn't check whether FUN is a function or not, and if it's not, it doesn't care. It actually takes a number as an argument, and returns that 5 times.
Here's an illustration:
> library(purrr)
>
> my_func <- function(FUN) map_dbl(1:5, ~ FUN)
>
> set.seed(seed = 35763)
> a <- sample(x = 1:10, size = 1)
> my_func(FUN = a)
[1] 8 8 8 8 8
>
> set.seed(seed = 35763)
> my_func(FUN = sample(x = 1:10, size = 1))
[1] 8 8 8 8 8
I would have done simply this:
> set.seed(seed = 35763)
> replicate(n = 5, expr = sample(x = 1:10, size = 1))
[1] 8 6 1 10 3
If you're a tidy person, consider purrr::rerun. Or, just use map_dbl this way:
> set.seed(seed = 35763)
> purrr::map_dbl(.x = 1:5, .f = ~ sample(x = 1:10, size = 1))
[1] 8 6 1 10 3
Hope this helps.