mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
Add a Crosswalk typeclass.
This commit is contained in:
parent
1906f84dad
commit
86dc5ad6f5
@ -13,3 +13,7 @@ instance Align [] where
|
||||
alignWith f as [] = f . This <$> as
|
||||
alignWith f [] bs = f . That <$> bs
|
||||
alignWith f (a : as) (b : bs) = f (These a b) : alignWith f as bs
|
||||
|
||||
|
||||
class Crosswalk t where
|
||||
sequenceL :: Align f => t (f a) -> f (t a)
|
||||
|
Loading…
Reference in New Issue
Block a user