[Haskell-cafe] Control.bimap?

Gregory Guthrie guthrie at mum.edu
Wed Dec 12 22:50:55 CET 2012


Yes, thanks, I've seen this; why can't cabal find the package?

Is the fact that it is filed under "archive" an indicator?!
I have tried Control.Bifunctor, and also Control.Categorical.Bifunctor, and Data.Bifunctor.

Certainly it is an easy thing to define myself, but I'm both trying to be minimalistic, and to understand what failed.
------------------------------------------- 
From: Clark Gaebel [mailto:cgaebel at uwaterloo.ca] 
Sent: Wednesday, December 12, 2012 3:12 PM
Subject: Re: [Haskell-cafe] Control.bimap?

http://hackage.haskell.org/packages/archive/categories/0.59/doc/html/Control-Categorical-Bifunctor.html
.
 And found a nicer approach:
   (ns,ne) = (nub***nub) unzip g
Or perhaps:
   (ns.ne) = bimap nub nub $ unzip g    -- from Control.Bifunctor 
 The SO reference I saw described bimap as a way to map a function over a pair, and it seemed like a great match, but I cannot find the bimap function, and cabal reports no package Control.Bifunctor.
??



More information about the Haskell-Cafe mailing list