r <- 1 v <- c(1,1) inA <- function(x) sum((x-v)^2)