1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00

Crosswalks imply Functors.

This commit is contained in:
Rob Rix 2016-03-10 13:15:39 -05:00
parent d792ddcd57
commit 64baf04a31

View File

@ -16,7 +16,7 @@ instance Align [] where
alignWith f (a : as) (b : bs) = f (These a b) : alignWith f as bs
class Crosswalk t where
class Functor t => Crosswalk t where
crosswalk :: Align f => (a -> f b) -> t a -> f (t b)
sequenceL :: Align f => t (f a) -> f (t a)
sequenceL = crosswalk id