add test cases for list, fix a bug for reduce.