1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 04:51:57 +03:00

🔥 isOdd in favour of odd.

🎩 @tclem.
This commit is contained in:
Rob Rix 2017-03-09 13:48:16 -05:00
parent 6917ca8f9e
commit ca9539c9cb

View File

@ -78,9 +78,6 @@ at v (Diagonal k) = do
overlaps :: Endpoint -> Endpoint -> Bool overlaps :: Endpoint -> Endpoint -> Bool
overlaps (Endpoint x y) (Endpoint u v) = x - y == u - v && x <= u overlaps (Endpoint x y) (Endpoint u v) = x - y == u - v && x <= u
isOdd :: Integral a => a -> Bool
isOdd = (== 1) . (`mod` 2)
inInterval :: Ord a => a -> (a, a) -> Bool inInterval :: Ord a => a -> (a, a) -> Bool
inInterval k (lower, upper) = k >= lower && k <= upper inInterval k (lower, upper) = k >= lower && k <= upper