
9 Jan
2010
9 Jan
'10
6:33 a.m.
On Fri, Jan 08, 2010 at 09:10:38PM -0800, John Millikin wrote:
Also, you may want to have CappedList an instance of Control.Functor.Bifunctor from category-extras: [...]
This is probably a good idea, but, I am nervous about making such a small package depend on the huge category-extras and mtl.
Well, then just provide the plain function in the module bimap :: (a -> b) -> (cap -> cap') -> CappedList cap a -> CappedList cap' b bimap f g = foldr (Next . f) (Cap . g) :) -- Felipe.