chapter 11 exercise 11-0: implement Vec that is similar to vector of standard library