✅ haskell: leap
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
module LeapYear (isLeapYear) where
|
||||
|
||||
isLeapYear year = hasFactor 4 && (not (hasFactor 100) || hasFactor 400)
|
||||
where hasFactor n = year `rem` n == 0
|
||||
Reference in New Issue
Block a user