1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00

Add a default implementation for crosswalk.

This commit is contained in:
Rob Rix 2016-03-10 13:15:48 -05:00
parent 64baf04a31
commit 35024d02cf

View File

@ -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