Fix iterate_list to be usable on empty list.
Simplify test case.
Merge pull request #249 from y-higuchi/fix_iterate_list_on_empty_list

Fix iterate_list to be usable on empty list.