Proposal: Add singleton function to Data.List module

chessai . chessai1996 at gmail.com
Sun Aug 18 17:56:39 UTC 2019


+1

On Sun, Aug 18, 2019, 7:41 PM Helmut Schmidt <helmut.schmidt.4711 at gmail.com>
wrote:

>
>
> Am So., 18. Aug. 2019 um 17:17 Uhr schrieb Oliver Charles <
> ollie at ocharles.org.uk>:
>
>> On Sun, 18 Aug 2019, 5:47 pm Helmut Schmidt, <
>> helmut.schmidt.4711 at gmail.com> wrote:
>>
>>>
>>> All these philosophical arguments calling for "consistency" with the
>>> container APIs or that function need words for the human mind to comprehend
>>> seem short-sighted to me. If we were consistent about the proposal itself
>>> we'd also demand to add
>>>
>>>   cons = (:)
>>>
>>>   empty = []
>>>
>>>   toList = id
>>>
>>>   fromList = id
>>>
>>
>> I honestly have no problem with any of these.
>>
>
> I forgot
>
>     append = (++)
>
> We also need to address another elephant in the room... those pesky tuples
> and their special privileged non-wordy syntax!
>
>    pair = (,)
>
>    triple = (,,)
>
>    quadruple = (,,,)
>
>    quituple = (,,,,)
>
>    sextuple = (,,,,,)
>
>    septuble = (,,,,,,)
>
>    octuple = (,,,,,,,)
>
> If Haskell were invented in this century's EU Haskell source code would be
> littered with €s instead of $s but then again I wonder why £ wasn't picked.
> But I digress. We can kill two birds with one stone here:
>
>    apply = ($)
>
>    strictApply = ($!)
>
>    compose = (.)
>
>
> It's fun to imagine how code using those definitions would like! But it's
> still a -1 for me, sorry!
>
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20190818/82c61e0e/attachment.html>


More information about the Libraries mailing list