mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
Add a default implementation for crosswalk.
This commit is contained in:
parent
64baf04a31
commit
35024d02cf
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user