chapter 11 exercise 11-8: implement a simplified version of standard list