Proposal for `prepend`
EverybodyKurts opened this issue · comments
Kurt Mueller commented
Here's an example (super easy way) of doing it:
prepend : List a -> List a -> List a
prepend prependee prepended =
List.concat [ prepended, prependee ]
If can create a merge request with the appropriate docs and tests if approved.
Max Goldstein commented
You can already do prepended ++ prependee
. This seems like a reverse of that, and doesn't seem worthwhile to me.
Kurt Mueller commented
Ha, I learned something new.
I'm fine with this decision. It's just weird to me that there's a List.append
in the core library but no List.prepend
. I also like to think that the two method names, append
and prepend
, are bit more intention revealing.
Anywho, just my two thoughts.
Max Goldstein commented
If you're fine with it, I'll close the issue.