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:
parent
6917ca8f9e
commit
ca9539c9cb
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user