Adding dup to Data.Tuple?
Dannyu NDos
ndospark320 at gmail.com
Sun Oct 28 07:51:58 UTC 2018
If this is for convenience for arrows, isn't it better implemented as?:
dup :: Arrow a => a b (b,b)
dup = id &&& id
2018년 10월 28일 (일) 15:03, Dan Burton <danburton.email at gmail.com>님이 작성:
> There is precedent in the arrow literature for calling this function
> "dup". For example, on page 55 of this paper:
> http://homepages.inf.ed.ac.uk/wadler/papers/arrows-jfp/arrows-jfp.pdf
>
> -- Dan Burton
>
>
> On Sun, Oct 28, 2018 at 12:48 AM David Feuer <david.feuer at gmail.com>
> wrote:
>
>> I'm not opposed. Should this be called dup or diagonal? What about larger
>> tuples?
>>
>> Side note:
>> \x -> (x,x) = join (,)
>>
>> On Sat, Oct 27, 2018, 6:03 PM Ivan Perez <ivan.perez at keera.co.uk> wrote:
>>
>>> Dear all,
>>>
>>> The function \x -> (x,x) is very convenient when working with arrows.
>>>
>>> Would it be appropriate to add it to Data.Tuple?
>>>
>>> Cheers,
>>>
>>> Ivan
>>>
>>> _______________________________________________
>>> Libraries mailing list
>>> Libraries at haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>>
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
> _______________________________________________
> 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/20181028/dea885a1/attachment.html>
More information about the Libraries
mailing list