Skip to content

Commit

Permalink
Simplify the recursion cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
robrix committed Jul 9, 2020
1 parent df01f31 commit a52a0cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Data/IntervalSet.hs
Expand Up @@ -63,7 +63,7 @@ delete deleted (IntervalSet t) = IntervalSet $ l F.>< go r
go s = case F.viewl s of
F.EmptyL -> F.empty
h F.:< t
| sup deleted < inf h -> s
| h `isSubintervalOf` deleted -> go t
| otherwise -> h `intersection` deleted F.<| go t
| sup deleted < inf h -> s
| sup deleted < sup h -> h `intersection` deleted F.<| go t
| otherwise -> go t
before i = inf deleted <= sup i

0 comments on commit a52a0cd

Please sign in to comment.