Improve listImpl

Hmm, I don't see this expression on that page. In any case, StackOverflow tends to have more mature impls of such utilities, since it has a larger, more active community and is designed to crowdsource them. Nevertheless, this seems ok enough.