mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Add a helper to test whether an integer is odd.
This commit is contained in:
parent
99069c3646
commit
abb71497da
@ -78,6 +78,9 @@ 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)
|
||||||
|
|
||||||
|
|
||||||
-- Instances
|
-- Instances
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user