Advertisement
clairec

Untitled

Sep 15th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. leap n = dv n 400 || dv n 4 && not (dv n 100) where dv x y = mod x y == 0
  2. leap' n = False `unl` dv n 4 `unl` dv n 100 `unl` dv n 400
  3. where
  4. infixr `unl`
  5. unl a b = if b then not a else a
  6. dv x y = mod x y == 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement