✅ haskell: leap

This commit is contained in:
walkah committed 2021-09-09 10:59:03 -04:00
1 parent 8fe30a1a00
commit b1ec5d6b16
9 files changed
+272

No files matched your search

+4
View 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))