Adding dup to Data.Tuple?

Ivan Perez ivan.perez at keera.co.uk
Sun Oct 28 11:52:24 UTC 2018


On 28/10/18 03:51, Dannyu NDos wrote:
> If this is for convenience for arrows, isn't it better implemented as?:
>
> dup :: Arrow a => a b (b,b)
> dup = id &&& id

Hi

Performance aside, I'd say your suggestion is better than using a pure 
function. It's clearer about what it does, and it works for functions as 
well (since they are arrows).

Ivan



More information about the Libraries mailing list