mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
📝 mapAnnotations.
This commit is contained in:
parent
4a3dd9afd8
commit
bb46960dd8
@ -43,5 +43,6 @@ afterTerm :: Mergeable f => Diff f annotation -> Maybe (Term f annotation)
|
||||
afterTerm = mergeMaybe after Both.snd
|
||||
|
||||
|
||||
-- | Map a function over the annotations in a diff, whether in diff or term nodes.
|
||||
mapAnnotations :: Functor f => (annotation -> annotation') -> Diff f annotation -> Diff f annotation'
|
||||
mapAnnotations f = iter (\ (h :< functor) -> wrap (fmap f h :< functor)) . fmap (pure . fmap (fmap f))
|
||||
|
Loading…
Reference in New Issue
Block a user