refactor of listmaker.rb using map.with_index. All tests pass