It's the easiest-to-implement persistent data structure, and there are lots of classic functional algorithms that work best when building a list in reverse.
which creates a new list, starting with 1, followed by the contents of someList
, might be e.g. expressed as
or, of course, some better, more concise name.
I'm not good at naming, so I tend to use very obvious, yet also very long, names 😅