1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 08:25:19 +03:00

Add a before function.

This commit is contained in:
Rob Rix 2015-11-19 17:25:28 -08:00
parent 69d797f135
commit 02b07b70d8

View File

@ -10,3 +10,8 @@ after :: Patch a -> Maybe a
after (Replace _ a) = Just a
after (Insert a) = Just a
after _ = Nothing
before :: Patch a -> Maybe a
before (Replace a _) = Just a
before (Delete a) = Just a
before _ = Nothing