Optimized list creation in recursive methods. Better to prepend and do reverse at end than to append each element