improve readability of complex code
improve readability of complex code


Former-commit-id: d06dae2d211e954797e2a361ed4d17490342a154
danielhers/dynet,shuheik/dynet,xunzhang/dynet,shuheik/dynet,shuheik/dynet,danielhers/dynet,clab/dynet,danielhers/dynet,danielhers/dynet,clab/cnn,chunyang-wen/dynet,chunyang-wen/dynet,chunyang-wen/dynet,clab/dynet,danielhers/dynet,clab/dynet,danielhers/dynet,xunzhang/dynet,shuheik/dynet,clab/dynet,clab/cnn,clab/dynet,xunzhang/dynet,clab/dynet,shuheik/dynet,xunzhang/dynet,shuheik/dynet,clab/cnn,danielhers/dynet,clab/dynet,shuheik/dynet,chunyang-wen/dynet