1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Document Align.

This commit is contained in:
Rob Rix 2016-03-11 12:40:13 -05:00
parent 89609467be
commit e0e3277ccc

View File

@ -3,6 +3,9 @@ module Data.Align where
import Data.Bifunctor.These
import Data.Functor.Identity
-- | A functor which can be aligned, essentially the union of (potentially) asymmetrical values.
-- |
-- | For example, this allows a zip over lists which pads out the shorter side with a default value.
class Functor f => Align f where
nil :: f a
align :: f a -> f b -> f (These a b)