testing passing functions by using lapply( X, mean )