Skip to content

dup and arr2 #308

@ivanperez-keera

Description

@ivanperez-keera

Hi,

Two functions from one of Yampa's auxiliary modules have become generally useful (they were made public and they have found use in games, other applications, and other libraries):

dup :: a -> (a, a)
dup x = (x, x)
arr2 :: Arrow a => (b -> c -> d) -> a (b, c) d
arr2 = arr . uncurry

Would you consider adding them to base?

I'd say the logical place for dup would be Data.Tuple and for arr2 would be Control.Arrow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    abandonedAbandoned by proposer (no-show)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions