Per the author - he doesn't remember
can’t remember why I went for functions and return types here 😂 . Chances are I didn’t really know what I was doing in 2020.
And a current maintainer of remeda isn't familiar with why the code would be written that way.
This code predates my time working on the library. If you have an issue caused by this you can share more info on that and I'll try to help, otherwise, if you are just curious you can try to ping the pr #95 to ask the author directly.
I'll close the question and if I come across this type of code again I'll ask the author directly.