1#' Create a list of given length
2#'
3#' @description
4#'
5#' \Sexpr[results=rd, stage=render]{purrr:::lifecycle("questioning")}
6#'
7#' It can be useful to create an empty list that you plan to fill later. This is
8#' similar to the idea of [seq_along()], which creates a vector of the same
9#' length as its input.
10#'
11#' @details
12#'
13#' This function might change to [vctrs::vec_init()].
14#'
15#' @param x A vector.
16#' @return A list of the same length as `x`.
17#' @keywords internal
18#' @examples
19#' x <- 1:5
20#' seq_along(x)
21#' list_along(x)
22#' @name along
23#' @rdname along
24#' @export
25list_along <- function(x) {
26  vector("list", length(x))
27}
28