Tweaked code sample to reverse list at start and simplified createResult