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

Document fromThese.

This commit is contained in:
Rob Rix 2016-03-24 11:29:01 -04:00
parent b0757d5fd3
commit 9055ada149

View File

@ -11,6 +11,7 @@ these f _ _ (This this) = f this
these _ f _ (That that) = f that
these _ _ f (These this that) = f this that
-- | Return a pair of values given These and defaults for either side.
fromThese :: a -> b -> These a b -> (a, b)
fromThese a b = these (flip (,) b) ((,) a) (,)