For more or less the same reasons that "singleton" was considered worth being added to Data.List I propose to add "cons" to Data.List as well.
## Motivation
Sometimes it is convenient to have a function to prepend an element to a list in pointless style code. But of the existing ways none of them are as clear as a separate monomorphic function.
- "( : )" is subjectively ugly
- "(\x xs -> x : xs)" is syntactically noisy
Purescript also has a "Cons" function so why can't we have one too?
We already have "Data.List.uncons" and so for symmetry one would also expect to find "Data.List.cons".
Many sequence like APIs have a "cons" function such as
I can't be the only that wants this function, right?
## Proposal
Add
cons :: x -> [x] -> [x]
cons = (:)
to Data.List