mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Simplify maybeBothOfThese
around fromThese
.
This commit is contained in:
parent
25bae5d9e0
commit
a33acf8bdf
@ -22,7 +22,7 @@ bothOfThese (Join a) = Join . uncurry fromThese a
|
||||
|
||||
-- | Construct Both (Maybe) with These values, defaulting to Nothing.
|
||||
maybeBothOfThese :: These a a -> Both (Maybe a)
|
||||
maybeBothOfThese = bothOfThese (pure Nothing) . bimap Just Just
|
||||
maybeBothOfThese = Join . fromThese Nothing Nothing . bimap Just Just
|
||||
|
||||
-- | Pairs either or both elements of These with the corresponding elements of Both.
|
||||
-- |
|
||||
|
Loading…
Reference in New Issue
Block a user