Returns x unchanged if it is already a list, otherwise wraps it in
a one-element list. Used internally to normalize arg inputs that may
be either a single numeric vector or a list of per-curve vectors.
See also
Other tidyfun utility functions:
in_range(),
tf_arg(),
tf_zoom(),
unique_id()
Examples
ensure_list(1:3)
#> [[1]]
#> [1] 1 2 3
#>
ensure_list(list(1:3, 4:6))
#> [[1]]
#> [1] 1 2 3
#>
#> [[2]]
#> [1] 4 5 6
#>