diff --git a/src/Data/Align.hs b/src/Data/Align.hs index 5b1946bca..189929c11 100644 --- a/src/Data/Align.hs +++ b/src/Data/Align.hs @@ -18,6 +18,8 @@ instance Align [] where class Functor t => Crosswalk t where crosswalk :: Align f => (a -> f b) -> t a -> f (t b) + crosswalk f = sequenceL . fmap f + sequenceL :: Align f => t (f a) -> f (t a) sequenceL = crosswalk id