pub(crate) fn map_vecsxp_with<U>(
sexp: SEXP,
map: impl FnMut(usize, SEXP) -> Result<U, SexpError>,
) -> Result<Vec<U>, SexpError>Expand description
Shared SEXP-dispatch shell for the VECSXP (list) walk.
List-side counterpart of from_numeric_vec_with / map_strsxp_with:
checks VECSXP, walks each element via vector_elt, and applies the
per-element map closure (which receives the element’s index and SEXP).
Per-element policy (recursion, NILSXP → None, duplicate-pointer
aliasing checks, …) lives entirely in the closure.