finished calcular funcional con vectores