Implemented e6 of List.hs