Proposal: Add singleton function to Data.List module
Herbert Valerio Riedel
hvriedel at gmail.com
Mon Aug 12 17:03:28 UTC 2019
> - `(:[])`: Subjectively ugly.
I consider "subjectively ugly" to be a non-technical and thus really
weak argument to dismiss the list-idiomatic ninja-robot-operator (:[])
which also happens to be shorter than the proposed alias for it. I for
one don't see a significant benefit for adding a redundant synonym to
`Data.List` and are thus -1 on this.
> singleton :: a -> [a]
> singleton x = [x]
More information about the Libraries
mailing list