Closed yutannihilation closed 5 months ago
Close #242
Rust:
#[savvy] fn default_value_vec(x: Option<IntegerSexp>) -> savvy::Result<Sexp> { if let Some(x) = x { x.iter().sum::<i32>().try_into() } else { (-1).try_into() } }
R:
default_value_vec <- function(x = NULL) { ...snip... }
default_value_vec(1:10) #> [1] 55 default_value_vec() #> [1] -1
Close #242
Rust:
R: