Skip to content

Commit c618817

Browse files
committed
No need for the maxBound test in enumFromTo.hs in ch9
Closes #3
1 parent 45838a9 commit c618817

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ch9/enumFromTo.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ eftOrd GT GT = [GT]
1717

1818
eftInt :: Int -> Int -> [Int]
1919
eftInt a b
20-
| a > b = []
21-
| a == b || a == maxBound = [a]
22-
| otherwise = a : eftInt (succ a) b
20+
| a > b = []
21+
| a == b = [a]
22+
| otherwise = a : eftInt (succ a) b
2323

2424
eftChar :: Char -> Char -> [Char]
2525
eftChar a b
26-
| a > b = []
27-
| a == b || a == maxBound = [a]
28-
| otherwise = a : eftChar (succ a) b
26+
| a > b = []
27+
| a == b = [a]
28+
| otherwise = a : eftChar (succ a) b

0 commit comments

Comments
 (0)