Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- leap n = dv n 400 || dv n 4 && not (dv n 100) where dv x y = mod x y == 0
- leap' n = False `unl` dv n 4 `unl` dv n 100 `unl` dv n 400
- where
- infixr `unl`
- unl a b = if b then not a else a
- dv x y = mod x y == 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement