[Haskell-cafe] Pairing function

Felipe Almeida Lessa felipe.lessa at gmail.com
Sun Sep 9 22:35:17 EDT 2007


On 9/9/07, ok <ok at cs.otago.ac.nz> wrote:
> I wanted to use the standard name for the function
>
>         pair :: (a -> b) -> (a -> c) -> (a -> (b,c))
>
>         pair f g x = (f x, g x)
>
> but I can find no such function in the Report or its Libraries.
> Is there a recommended name for this?

It is called (&&&) and is avaiable from Control.Arrow.

-- 
Felipe.


More information about the Haskell-Cafe mailing list