
28 Oct
2018
28 Oct
'18
7:52 a.m.
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