Is there a function \x -> (x, x) in standard libraries?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a function \x -> (x, x) in standard libraries?

Ignat Insarov
Hello.

I wonder if there is a function like \x -> (x, x) in the standard libraries.

I looked up in Hoogle. It gave me links:

1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe

None of these is to the standard library. I wonder if there is an
intentional omission for some important reason? If not, I think this
function should be added to Data.Tuple.

I know some of the persons that make decisions here like Category
theory, so I point out this function is mentioned in Categories for
the Working Mathematician, as δ, the diagonal function, on page 3
(second edition), although set with angular brackets.

Have a great day.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Zemyla
id &&& id

On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
Hello.

I wonder if there is a function like \x -> (x, x) in the standard libraries.

I looked up in Hoogle. It gave me links:

1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe

None of these is to the standard library. I wonder if there is an
intentional omission for some important reason? If not, I think this
function should be added to Data.Tuple.

I know some of the persons that make decisions here like Category
theory, so I point out this function is mentioned in Categories for
the Working Mathematician, as δ, the diagonal function, on page 3
(second edition), although set with angular brackets.

Have a great day.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Lennart Augustsson
Or 'join (,)'

On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
id &&& id

On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
Hello.

I wonder if there is a function like \x -> (x, x) in the standard libraries.

I looked up in Hoogle. It gave me links:

1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe

None of these is to the standard library. I wonder if there is an
intentional omission for some important reason? If not, I think this
function should be added to Data.Tuple.

I know some of the persons that make decisions here like Category
theory, so I point out this function is mentioned in Categories for
the Working Mathematician, as δ, the diagonal function, on page 3
(second edition), although set with angular brackets.

Have a great day.
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Ignat Insarov
So, it is not considered harmful. Then I propose we add it to
Data.Tuple under a humane name.

On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson <[hidden email]> wrote:

>
> Or 'join (,)'
>
> On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
>>
>> id &&& id
>>
>> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
>>>
>>> Hello.
>>>
>>> I wonder if there is a function like \x -> (x, x) in the standard libraries.
>>>
>>> I looked up in Hoogle. It gave me links:
>>>
>>> 1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
>>> 2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
>>> 3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
>>>
>>> None of these is to the standard library. I wonder if there is an
>>> intentional omission for some important reason? If not, I think this
>>> function should be added to Data.Tuple.
>>>
>>> I know some of the persons that make decisions here like Category
>>> theory, so I point out this function is mentioned in Categories for
>>> the Working Mathematician, as δ, the diagonal function, on page 3
>>> (second edition), although set with angular brackets.
>>>
>>> Have a great day.
>>> _______________________________________________
>>> Libraries mailing list
>>> [hidden email]
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Lennart Augustsson
It's not harmful, but is it common enough to have a name?

On Tue, Jul 16, 2019, 12:28 Ignat Insarov <[hidden email]> wrote:
So, it is not considered harmful. Then I propose we add it to
Data.Tuple under a humane name.

On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson <[hidden email]> wrote:
>
> Or 'join (,)'
>
> On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
>>
>> id &&& id
>>
>> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
>>>
>>> Hello.
>>>
>>> I wonder if there is a function like \x -> (x, x) in the standard libraries.
>>>
>>> I looked up in Hoogle. It gave me links:
>>>
>>> 1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
>>> 2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
>>> 3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
>>>
>>> None of these is to the standard library. I wonder if there is an
>>> intentional omission for some important reason? If not, I think this
>>> function should be added to Data.Tuple.
>>>
>>> I know some of the persons that make decisions here like Category
>>> theory, so I point out this function is mentioned in Categories for
>>> the Working Mathematician, as δ, the diagonal function, on page 3
>>> (second edition), although set with angular brackets.
>>>
>>> Have a great day.
>>> _______________________________________________
>>> Libraries mailing list
>>> [hidden email]
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Vladislav Zavialov-2
It is reasonably common. I have grepped Hackage using https://codesearch.aelve.com/haskell/ and

* \x->(x,x) occurs 203 times
* join (,) occurs 53 times
* id &&& id occurs 22 times

It also pops up in discussions as a counter-example of a linear function:

dup :: a ->. (a,a)
dup x = (x,x)  -- does not typecheck with -XLinearTypes!

I think it should be added under the name "dup" (short for “duplicate”).

- Vlad

> On 16 Jul 2019, at 22:29, Lennart Augustsson <[hidden email]> wrote:
>
> It's not harmful, but is it common enough to have a name?
>
> On Tue, Jul 16, 2019, 12:28 Ignat Insarov <[hidden email]> wrote:
> So, it is not considered harmful. Then I propose we add it to
> Data.Tuple under a humane name.
>
> On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson <[hidden email]> wrote:
> >
> > Or 'join (,)'
> >
> > On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
> >>
> >> id &&& id
> >>
> >> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
> >>>
> >>> Hello.
> >>>
> >>> I wonder if there is a function like \x -> (x, x) in the standard libraries.
> >>>
> >>> I looked up in Hoogle. It gave me links:
> >>>
> >>> 1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
> >>> 2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
> >>> 3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
> >>>
> >>> None of these is to the standard library. I wonder if there is an
> >>> intentional omission for some important reason? If not, I think this
> >>> function should be added to Data.Tuple.
> >>>
> >>> I know some of the persons that make decisions here like Category
> >>> theory, so I point out this function is mentioned in Categories for
> >>> the Working Mathematician, as δ, the diagonal function, on page 3
> >>> (second edition), although set with angular brackets.
> >>>
> >>> Have a great day.
> >>> _______________________________________________
> >>> Libraries mailing list
> >>> [hidden email]
> >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> >>
> >> _______________________________________________
> >> Libraries mailing list
> >> [hidden email]
> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Dan Burton
+1 for "dup", if it is to be included at all.

-- Dan Burton


On Tue, Jul 16, 2019 at 12:56 PM Vladislav Zavialov <[hidden email]> wrote:
It is reasonably common. I have grepped Hackage using https://codesearch.aelve.com/haskell/ and

* \x->(x,x) occurs 203 times
* join (,) occurs 53 times
* id &&& id occurs 22 times

It also pops up in discussions as a counter-example of a linear function:

dup :: a ->. (a,a)
dup x = (x,x)  -- does not typecheck with -XLinearTypes!

I think it should be added under the name "dup" (short for “duplicate”).

- Vlad

> On 16 Jul 2019, at 22:29, Lennart Augustsson <[hidden email]> wrote:
>
> It's not harmful, but is it common enough to have a name?
>
> On Tue, Jul 16, 2019, 12:28 Ignat Insarov <[hidden email]> wrote:
> So, it is not considered harmful. Then I propose we add it to
> Data.Tuple under a humane name.
>
> On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson <[hidden email]> wrote:
> >
> > Or 'join (,)'
> >
> > On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
> >>
> >> id &&& id
> >>
> >> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
> >>>
> >>> Hello.
> >>>
> >>> I wonder if there is a function like \x -> (x, x) in the standard libraries.
> >>>
> >>> I looked up in Hoogle. It gave me links:
> >>>
> >>> 1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
> >>> 2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
> >>> 3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
> >>>
> >>> None of these is to the standard library. I wonder if there is an
> >>> intentional omission for some important reason? If not, I think this
> >>> function should be added to Data.Tuple.
> >>>
> >>> I know some of the persons that make decisions here like Category
> >>> theory, so I point out this function is mentioned in Categories for
> >>> the Working Mathematician, as δ, the diagonal function, on page 3
> >>> (second edition), although set with angular brackets.
> >>>
> >>> Have a great day.
> >>> _______________________________________________
> >>> Libraries mailing list
> >>> [hidden email]
> >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> >>
> >> _______________________________________________
> >> Libraries mailing list
> >> [hidden email]
> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Theodore Lief Gannon
Note that there is already a function named dup in base [1], albeit in what's probably a low-traffic module (GHC.IO.Device).

As an alternative I would suggest twin, which returns no results from Stackage Hoogle.

On the other hand, I'm roughly -0.5 on adding this at all; what use case does it serve that's not better handled with &&&? (Those 22 occurences of id &&& id seem most likely to provide illumination...)


On Tue, Jul 16, 2019 at 2:22 PM Dan Burton <[hidden email]> wrote:
+1 for "dup", if it is to be included at all.

-- Dan Burton


On Tue, Jul 16, 2019 at 12:56 PM Vladislav Zavialov <[hidden email]> wrote:
It is reasonably common. I have grepped Hackage using https://codesearch.aelve.com/haskell/ and

* \x->(x,x) occurs 203 times
* join (,) occurs 53 times
* id &&& id occurs 22 times

It also pops up in discussions as a counter-example of a linear function:

dup :: a ->. (a,a)
dup x = (x,x)  -- does not typecheck with -XLinearTypes!

I think it should be added under the name "dup" (short for “duplicate”).

- Vlad

> On 16 Jul 2019, at 22:29, Lennart Augustsson <[hidden email]> wrote:
>
> It's not harmful, but is it common enough to have a name?
>
> On Tue, Jul 16, 2019, 12:28 Ignat Insarov <[hidden email]> wrote:
> So, it is not considered harmful. Then I propose we add it to
> Data.Tuple under a humane name.
>
> On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson <[hidden email]> wrote:
> >
> > Or 'join (,)'
> >
> > On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
> >>
> >> id &&& id
> >>
> >> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
> >>>
> >>> Hello.
> >>>
> >>> I wonder if there is a function like \x -> (x, x) in the standard libraries.
> >>>
> >>> I looked up in Hoogle. It gave me links:
> >>>
> >>> 1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
> >>> 2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
> >>> 3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
> >>>
> >>> None of these is to the standard library. I wonder if there is an
> >>> intentional omission for some important reason? If not, I think this
> >>> function should be added to Data.Tuple.
> >>>
> >>> I know some of the persons that make decisions here like Category
> >>> theory, so I point out this function is mentioned in Categories for
> >>> the Working Mathematician, as δ, the diagonal function, on page 3
> >>> (second edition), although set with angular brackets.
> >>>
> >>> Have a great day.
> >>> _______________________________________________
> >>> Libraries mailing list
> >>> [hidden email]
> >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> >>
> >> _______________________________________________
> >> Libraries mailing list
> >> [hidden email]
> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

David Feuer
I don't think an obscure GHC IO function needs to be considered with regard to naming. I don't currently have an opinion about whether to add this.

On Tue, Jul 16, 2019, 6:30 PM Theodore Lief Gannon <[hidden email]> wrote:
Note that there is already a function named dup in base [1], albeit in what's probably a low-traffic module (GHC.IO.Device).

As an alternative I would suggest twin, which returns no results from Stackage Hoogle.

On the other hand, I'm roughly -0.5 on adding this at all; what use case does it serve that's not better handled with &&&? (Those 22 occurences of id &&& id seem most likely to provide illumination...)


On Tue, Jul 16, 2019 at 2:22 PM Dan Burton <[hidden email]> wrote:
+1 for "dup", if it is to be included at all.

-- Dan Burton


On Tue, Jul 16, 2019 at 12:56 PM Vladislav Zavialov <[hidden email]> wrote:
It is reasonably common. I have grepped Hackage using https://codesearch.aelve.com/haskell/ and

* \x->(x,x) occurs 203 times
* join (,) occurs 53 times
* id &&& id occurs 22 times

It also pops up in discussions as a counter-example of a linear function:

dup :: a ->. (a,a)
dup x = (x,x)  -- does not typecheck with -XLinearTypes!

I think it should be added under the name "dup" (short for “duplicate”).

- Vlad

> On 16 Jul 2019, at 22:29, Lennart Augustsson <[hidden email]> wrote:
>
> It's not harmful, but is it common enough to have a name?
>
> On Tue, Jul 16, 2019, 12:28 Ignat Insarov <[hidden email]> wrote:
> So, it is not considered harmful. Then I propose we add it to
> Data.Tuple under a humane name.
>
> On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson <[hidden email]> wrote:
> >
> > Or 'join (,)'
> >
> > On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
> >>
> >> id &&& id
> >>
> >> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
> >>>
> >>> Hello.
> >>>
> >>> I wonder if there is a function like \x -> (x, x) in the standard libraries.
> >>>
> >>> I looked up in Hoogle. It gave me links:
> >>>
> >>> 1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
> >>> 2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
> >>> 3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
> >>>
> >>> None of these is to the standard library. I wonder if there is an
> >>> intentional omission for some important reason? If not, I think this
> >>> function should be added to Data.Tuple.
> >>>
> >>> I know some of the persons that make decisions here like Category
> >>> theory, so I point out this function is mentioned in Categories for
> >>> the Working Mathematician, as δ, the diagonal function, on page 3
> >>> (second edition), although set with angular brackets.
> >>>
> >>> Have a great day.
> >>> _______________________________________________
> >>> Libraries mailing list
> >>> [hidden email]
> >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> >>
> >> _______________________________________________
> >> Libraries mailing list
> >> [hidden email]
> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Andreas Abel
In reply to this post by Dan Burton
On 2019-07-16 23:21, Dan Burton wrote:
> +1 for "dup", if it is to be included at all.

Same here.  --Andreas

> On Tue, Jul 16, 2019 at 12:56 PM Vladislav Zavialov
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     It is reasonably common. I have grepped Hackage using
>     https://codesearch.aelve.com/haskell/ and
>
>     * \x->(x,x) occurs 203 times
>     * join (,) occurs 53 times
>     * id &&& id occurs 22 times
>
>     It also pops up in discussions as a counter-example of a linear
>     function:
>
>     dup :: a ->. (a,a)
>     dup x = (x,x)  -- does not typecheck with -XLinearTypes!
>
>     I think it should be added under the name "dup" (short for “duplicate”).
>
>     - Vlad
>
>      > On 16 Jul 2019, at 22:29, Lennart Augustsson
>     <[hidden email] <mailto:[hidden email]>> wrote:
>      >
>      > It's not harmful, but is it common enough to have a name?
>      >
>      > On Tue, Jul 16, 2019, 12:28 Ignat Insarov <[hidden email]
>     <mailto:[hidden email]>> wrote:
>      > So, it is not considered harmful. Then I propose we add it to
>      > Data.Tuple under a humane name.
>      >
>      > On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson
>     <[hidden email] <mailto:[hidden email]>> wrote:
>      > >
>      > > Or 'join (,)'
>      > >
>      > > On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]
>     <mailto:[hidden email]>> wrote:
>      > >>
>      > >> id &&& id
>      > >>
>      > >> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]
>     <mailto:[hidden email]>> wrote:
>      > >>>
>      > >>> Hello.
>      > >>>
>      > >>> I wonder if there is a function like \x -> (x, x) in the
>     standard libraries.
>      > >>>
>      > >>> I looked up in Hoogle. It gave me links:
>      > >>>
>      > >>> 1.
>     https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
>      > >>> 2.
>     https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
>      > >>> 3.
>     https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
>      > >>>
>      > >>> None of these is to the standard library. I wonder if there is an
>      > >>> intentional omission for some important reason? If not, I
>     think this
>      > >>> function should be added to Data.Tuple.
>      > >>>
>      > >>> I know some of the persons that make decisions here like Category
>      > >>> theory, so I point out this function is mentioned in
>     Categories for
>      > >>> the Working Mathematician, as δ, the diagonal function, on page 3
>      > >>> (second edition), although set with angular brackets.
>      > >>>
>      > >>> Have a great day.
>      > >>> _______________________________________________
>      > >>> Libraries mailing list
>      > >>> [hidden email] <mailto:[hidden email]>
>      > >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>      > >>
>      > >> _______________________________________________
>      > >> Libraries mailing list
>      > >> [hidden email] <mailto:[hidden email]>
>      > >> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>      > _______________________________________________
>      > Libraries mailing list
>      > [hidden email] <mailto:[hidden email]>
>      > http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
>     _______________________________________________
>     Libraries mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
>
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Haskell - Libraries mailing list
In reply to this post by Vladislav Zavialov-2
I think hiding the function (\x->(x,x)) behind any of these indirections (dup, join (,), or (id&&&id)) is just wilful obfuscation.  The clearest and most direct way to understand the function is to use the lambda - it needs no hard-to-remember name.

M.

On 16 Jul 2019, at 20:56, Vladislav Zavialov wrote:

> It is reasonably common. I have grepped Hackage using https://codesearch.aelve.com/haskell/ and
>
> * \x->(x,x) occurs 203 times
> * join (,) occurs 53 times
> * id &&& id occurs 22 times
>
> It also pops up in discussions as a counter-example of a linear function:
>
> dup :: a ->. (a,a)
> dup x = (x,x)  -- does not typecheck with -XLinearTypes!
>
> I think it should be added under the name "dup" (short for “duplicate”).
>
> - Vlad
>
>> On 16 Jul 2019, at 22:29, Lennart Augustsson <[hidden email]> wrote:
>>
>> It's not harmful, but is it common enough to have a name?
>>
>> On Tue, Jul 16, 2019, 12:28 Ignat Insarov <[hidden email]> wrote:
>> So, it is not considered harmful. Then I propose we add it to
>> Data.Tuple under a humane name.
>>
>> On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson <[hidden email]> wrote:
>>>
>>> Or 'join (,)'
>>>
>>> On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
>>>>
>>>> id &&& id
>>>>
>>>> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
>>>>>
>>>>> Hello.
>>>>>
>>>>> I wonder if there is a function like \x -> (x, x) in the standard libraries.
>>>>>
>>>>> I looked up in Hoogle. It gave me links:
>>>>>
>>>>> 1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
>>>>> 2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
>>>>> 3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
>>>>>
>>>>> None of these is to the standard library. I wonder if there is an
>>>>> intentional omission for some important reason? If not, I think this
>>>>> function should be added to Data.Tuple.
>>>>>
>>>>> I know some of the persons that make decisions here like Category
>>>>> theory, so I point out this function is mentioned in Categories for
>>>>> the Working Mathematician, as δ, the diagonal function, on page 3
>>>>> (second edition), although set with angular brackets.
>>>>>
>>>>> Have a great day.
>>>>> _______________________________________________
>>>>> Libraries mailing list
>>>>> [hidden email]
>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>>>
>>>> _______________________________________________
>>>> Libraries mailing list
>>>> [hidden email]
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Jon Purdy
I often define this in my own code (especially arrowful/pointfree code) as ‘dup = join (,)’—a fairly common name for this from the lands of category theory and concatenative programming, and a common abbreviation of ‘duplicate’ in other contexts like the aforementioned dup(2) for file descriptors.

It’s fundamental enough a logical operation (contraction) to warrant a name, in my opinion—we already have ‘const’ for weakening and ‘flip’ for exchange.

On Wed, Jul 17, 2019, 05:10 Malcolm Wallace via Libraries <[hidden email]> wrote:
I think hiding the function (\x->(x,x)) behind any of these indirections (dup, join (,), or (id&&&id)) is just wilful obfuscation.  The clearest and most direct way to understand the function is to use the lambda - it needs no hard-to-remember name.

M.

On 16 Jul 2019, at 20:56, Vladislav Zavialov wrote:

> It is reasonably common. I have grepped Hackage using https://codesearch.aelve.com/haskell/ and
>
> * \x->(x,x) occurs 203 times
> * join (,) occurs 53 times
> * id &&& id occurs 22 times
>
> It also pops up in discussions as a counter-example of a linear function:
>
> dup :: a ->. (a,a)
> dup x = (x,x)  -- does not typecheck with -XLinearTypes!
>
> I think it should be added under the name "dup" (short for “duplicate”).
>
> - Vlad
>
>> On 16 Jul 2019, at 22:29, Lennart Augustsson <[hidden email]> wrote:
>>
>> It's not harmful, but is it common enough to have a name?
>>
>> On Tue, Jul 16, 2019, 12:28 Ignat Insarov <[hidden email]> wrote:
>> So, it is not considered harmful. Then I propose we add it to
>> Data.Tuple under a humane name.
>>
>> On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson <[hidden email]> wrote:
>>>
>>> Or 'join (,)'
>>>
>>> On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
>>>>
>>>> id &&& id
>>>>
>>>> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
>>>>>
>>>>> Hello.
>>>>>
>>>>> I wonder if there is a function like \x -> (x, x) in the standard libraries.
>>>>>
>>>>> I looked up in Hoogle. It gave me links:
>>>>>
>>>>> 1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
>>>>> 2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
>>>>> 3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
>>>>>
>>>>> None of these is to the standard library. I wonder if there is an
>>>>> intentional omission for some important reason? If not, I think this
>>>>> function should be added to Data.Tuple.
>>>>>
>>>>> I know some of the persons that make decisions here like Category
>>>>> theory, so I point out this function is mentioned in Categories for
>>>>> the Working Mathematician, as δ, the diagonal function, on page 3
>>>>> (second edition), although set with angular brackets.
>>>>>
>>>>> Have a great day.
>>>>> _______________________________________________
>>>>> Libraries mailing list
>>>>> [hidden email]
>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>>>
>>>> _______________________________________________
>>>> Libraries mailing list
>>>> [hidden email]
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Edward Kmett-2
+1 for dup either exported by Data.Tuple or via Data.Arrow in greater generality.

Sent from my iPhone

On Jul 17, 2019, at 1:49 PM, Jon Purdy <[hidden email]> wrote:

I often define this in my own code (especially arrowful/pointfree code) as ‘dup = join (,)’—a fairly common name for this from the lands of category theory and concatenative programming, and a common abbreviation of ‘duplicate’ in other contexts like the aforementioned dup(2) for file descriptors.

It’s fundamental enough a logical operation (contraction) to warrant a name, in my opinion—we already have ‘const’ for weakening and ‘flip’ for exchange.

On Wed, Jul 17, 2019, 05:10 Malcolm Wallace via Libraries <[hidden email]> wrote:
I think hiding the function (\x->(x,x)) behind any of these indirections (dup, join (,), or (id&&&id)) is just wilful obfuscation.  The clearest and most direct way to understand the function is to use the lambda - it needs no hard-to-remember name.

M.

On 16 Jul 2019, at 20:56, Vladislav Zavialov wrote:

> It is reasonably common. I have grepped Hackage using https://codesearch.aelve.com/haskell/ and
>
> * \x->(x,x) occurs 203 times
> * join (,) occurs 53 times
> * id &&& id occurs 22 times
>
> It also pops up in discussions as a counter-example of a linear function:
>
> dup :: a ->. (a,a)
> dup x = (x,x)  -- does not typecheck with -XLinearTypes!
>
> I think it should be added under the name "dup" (short for “duplicate”).
>
> - Vlad
>
>> On 16 Jul 2019, at 22:29, Lennart Augustsson <[hidden email]> wrote:
>>
>> It's not harmful, but is it common enough to have a name?
>>
>> On Tue, Jul 16, 2019, 12:28 Ignat Insarov <[hidden email]> wrote:
>> So, it is not considered harmful. Then I propose we add it to
>> Data.Tuple under a humane name.
>>
>> On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson <[hidden email]> wrote:
>>>
>>> Or 'join (,)'
>>>
>>> On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
>>>>
>>>> id &&& id
>>>>
>>>> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
>>>>>
>>>>> Hello.
>>>>>
>>>>> I wonder if there is a function like \x -> (x, x) in the standard libraries.
>>>>>
>>>>> I looked up in Hoogle. It gave me links:
>>>>>
>>>>> 1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
>>>>> 2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
>>>>> 3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
>>>>>
>>>>> None of these is to the standard library. I wonder if there is an
>>>>> intentional omission for some important reason? If not, I think this
>>>>> function should be added to Data.Tuple.
>>>>>
>>>>> I know some of the persons that make decisions here like Category
>>>>> theory, so I point out this function is mentioned in Categories for
>>>>> the Working Mathematician, as δ, the diagonal function, on page 3
>>>>> (second edition), although set with angular brackets.
>>>>>
>>>>> Have a great day.
>>>>> _______________________________________________
>>>>> Libraries mailing list
>>>>> [hidden email]
>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>>>
>>>> _______________________________________________
>>>> Libraries mailing list
>>>> [hidden email]
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Henrik Nilsson-2
In reply to this post by Andreas Abel
On 07/17/2019 12:26 PM, Andreas Abel wrote:
> On 2019-07-16 23:21, Dan Burton wrote:
>> +1 for "dup", if it is to be included at all.
>
> Same here.  --Andreas

And +1 from me. It's a well established name in the literature.

/Henrik




This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment.

Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored
where permitted by law.




_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Tony Morris
I like dup and yes I have written this function hundreds of times.

dup =  join (,)

Would be good to have it in base.



On Thu, Jul 18, 2019 at 5:16 PM Henrik Nilsson <[hidden email]> wrote:
On 07/17/2019 12:26 PM, Andreas Abel wrote:
> On 2019-07-16 23:21, Dan Burton wrote:
>> +1 for "dup", if it is to be included at all.
>
> Same here.  --Andreas

And +1 from me. It's a well established name in the literature.

/Henrik




This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment.

Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored
where permitted by law.




_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Cale Gibbard
Does lambda not exist for a reason?

On Tue, 23 Jul 2019 at 22:59, Tony Morris <[hidden email]> wrote:

>
> I like dup and yes I have written this function hundreds of times.
>
> dup =  join (,)
>
> Would be good to have it in base.
>
>
>
> On Thu, Jul 18, 2019 at 5:16 PM Henrik Nilsson <[hidden email]> wrote:
>>
>> On 07/17/2019 12:26 PM, Andreas Abel wrote:
>> > On 2019-07-16 23:21, Dan Burton wrote:
>> >> +1 for "dup", if it is to be included at all.
>> >
>> > Same here.  --Andreas
>>
>> And +1 from me. It's a well established name in the literature.
>>
>> /Henrik
>>
>>
>>
>>
>> This message and any attachment are intended solely for the addressee
>> and may contain confidential information. If you have received this
>> message in error, please contact the sender and delete the email and
>> attachment.
>>
>> Any views or opinions expressed by the author of this email do not
>> necessarily reflect the views of the University of Nottingham. Email
>> communications with the University of Nottingham may be monitored
>> where permitted by law.
>>
>>
>>
>>
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Vladislav Zavialov-2
map (\x->(x,x)) is quite a punctuation soup compared to ‘map dup’.

- Vlad

> On 24 Jul 2019, at 16:48, Cale Gibbard <[hidden email]> wrote:
>
> Does lambda not exist for a reason?
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Cale Gibbard
The advantage of (\x->(x,x)) as a name is that for a small number of
additional characters, the meaning is obvious even if you didn't know
that this thing existed before, and it generalises nicely -- to other
tuples, or a change from using pairs to some other data structure.

Now, I would actually support the idea of having a type class for
categories with such a diagonal map. But this already exists:

http://hackage.haskell.org/package/categories-1.0.7/docs/Control-Category-Cartesian.html
-- See 'diag'.

One thing I think would be really nice is for the proc/do (Arrow)
notation to be defined in terms of the stuff which is currently in the
'categories' package, which ultimately might mean blessing that stuff
a little more. Of course, Conal has also experimented with
interpreting lambdas in terms of similar classes of operations, which
is an extremely powerful idea as well.

On Wed, 24 Jul 2019 at 09:54, Vladislav Zavialov <[hidden email]> wrote:

>
> map (\x->(x,x)) is quite a punctuation soup compared to ‘map dup’.
>
> - Vlad
>
> > On 24 Jul 2019, at 16:48, Cale Gibbard <[hidden email]> wrote:
> >
> > Does lambda not exist for a reason?
> > _______________________________________________
> > Libraries mailing list
> > [hidden email]
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Elliot Cameron-2
-1 

We already have a 'dup' function defined in base but it does something completely different. I see no reason to add a mild abbreviation and force Haskellers to add yet another silly word to their vocabulary. Library authors can already create their own set of vocabulary by importing a common internal module. Base doesn't need to get involved.

On Wed, Jul 24, 2019 at 10:06 AM Cale Gibbard <[hidden email]> wrote:
The advantage of (\x->(x,x)) as a name is that for a small number of
additional characters, the meaning is obvious even if you didn't know
that this thing existed before, and it generalises nicely -- to other
tuples, or a change from using pairs to some other data structure.

Now, I would actually support the idea of having a type class for
categories with such a diagonal map. But this already exists:

http://hackage.haskell.org/package/categories-1.0.7/docs/Control-Category-Cartesian.html
-- See 'diag'.

One thing I think would be really nice is for the proc/do (Arrow)
notation to be defined in terms of the stuff which is currently in the
'categories' package, which ultimately might mean blessing that stuff
a little more. Of course, Conal has also experimented with
interpreting lambdas in terms of similar classes of operations, which
is an extremely powerful idea as well.

On Wed, 24 Jul 2019 at 09:54, Vladislav Zavialov <[hidden email]> wrote:
>
> map (\x->(x,x)) is quite a punctuation soup compared to ‘map dup’.
>
> - Vlad
>
> > On 24 Jul 2019, at 16:48, Cale Gibbard <[hidden email]> wrote:
> >
> > Does lambda not exist for a reason?
> > _______________________________________________
> > Libraries mailing list
> > [hidden email]
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Is there a function \x -> (x, x) in standard libraries?

Conal Elliott
In reply to this post by Edward Kmett-2
On Wed, Jul 17, 2019 at 11:00 AM Edward Kmett <[hidden email]> wrote:
+1 for dup either exported by Data.Tuple or via Data.Arrow in greater generality.

Ditto. +1 for either of these two options.
 
On Jul 17, 2019, at 1:49 PM, Jon Purdy <[hidden email]> wrote:

I often define this in my own code (especially arrowful/pointfree code) as ‘dup = join (,)’—a fairly common name for this from the lands of category theory and concatenative programming, and a common abbreviation of ‘duplicate’ in other contexts like the aforementioned dup(2) for file descriptors.

It’s fundamental enough a logical operation (contraction) to warrant a name, in my opinion—we already have ‘const’ for weakening and ‘flip’ for exchange.

On Wed, Jul 17, 2019, 05:10 Malcolm Wallace via Libraries <[hidden email]> wrote:
I think hiding the function (\x->(x,x)) behind any of these indirections (dup, join (,), or (id&&&id)) is just wilful obfuscation.  The clearest and most direct way to understand the function is to use the lambda - it needs no hard-to-remember name.

M.

On 16 Jul 2019, at 20:56, Vladislav Zavialov wrote:

> It is reasonably common. I have grepped Hackage using https://codesearch.aelve.com/haskell/ and
>
> * \x->(x,x) occurs 203 times
> * join (,) occurs 53 times
> * id &&& id occurs 22 times
>
> It also pops up in discussions as a counter-example of a linear function:
>
> dup :: a ->. (a,a)
> dup x = (x,x)  -- does not typecheck with -XLinearTypes!
>
> I think it should be added under the name "dup" (short for “duplicate”).
>
> - Vlad
>
>> On 16 Jul 2019, at 22:29, Lennart Augustsson <[hidden email]> wrote:
>>
>> It's not harmful, but is it common enough to have a name?
>>
>> On Tue, Jul 16, 2019, 12:28 Ignat Insarov <[hidden email]> wrote:
>> So, it is not considered harmful. Then I propose we add it to
>> Data.Tuple under a humane name.
>>
>> On Tue, 16 Jul 2019 at 19:41, Lennart Augustsson <[hidden email]> wrote:
>>>
>>> Or 'join (,)'
>>>
>>> On Tue, Jul 16, 2019, 09:26 Zemyla <[hidden email]> wrote:
>>>>
>>>> id &&& id
>>>>
>>>> On Tue, Jul 16, 2019, 10:58 Ignat Insarov <[hidden email]> wrote:
>>>>>
>>>>> Hello.
>>>>>
>>>>> I wonder if there is a function like \x -> (x, x) in the standard libraries.
>>>>>
>>>>> I looked up in Hoogle. It gave me links:
>>>>>
>>>>> 1. https://hackage.haskell.org/package/utility-ht/docs/Data-Tuple-HT.html#v:double
>>>>> 2. https://hackage.haskell.org/package/extra/docs/Data-Tuple-Extra.html#v:dupe
>>>>> 3. https://hackage.haskell.org/package/relude/docs/Relude-Extra-Tuple.html#v:dupe
>>>>>
>>>>> None of these is to the standard library. I wonder if there is an
>>>>> intentional omission for some important reason? If not, I think this
>>>>> function should be added to Data.Tuple.
>>>>>
>>>>> I know some of the persons that make decisions here like Category
>>>>> theory, so I point out this function is mentioned in Categories for
>>>>> the Working Mathematician, as δ, the diagonal function, on page 3
>>>>> (second edition), although set with angular brackets.
>>>>>
>>>>> Have a great day.
>>>>> _______________________________________________
>>>>> Libraries mailing list
>>>>> [hidden email]
>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>>>
>>>> _______________________________________________
>>>> Libraries mailing list
>>>> [hidden email]
>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>> _______________________________________________
>> Libraries mailing list
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
> _______________________________________________
> Libraries mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries