✅ haskell: leap
This commit is contained in:
4
haskell/leap/src/LeapYear.hs
Normal file
4
haskell/leap/src/LeapYear.hs
Normal file
@ -0,0 +1,4 @@
|
||||
module LeapYear (isLeapYear) where
|
||||
|
||||
isLeapYear :: Integer -> Bool
|
||||
isLeapYear year = year `mod` 4 == 0 && ((year `mod` 100 /= 0) || (year `mod` 400 == 0))
|
Reference in New Issue
Block a user