79755270

Date: 2025-09-04 03:57:59
Score: 0.5
Natty:
Report link

If you want to avoid appending, you could reduce the reversed list on itself:

l = [1,2,3,4]
lr = Enum.reverse(l)
Enum.reduce(lr, lr, fn x, acc -> [x | acc] end)

This will avoid traversing the list twice (once for reverse, another for appending with ++).

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: GChamon