Skip to content

Instantly share code, notes, and snippets.

@Xjs
Created October 18, 2012 16:54
Show Gist options
  • Save Xjs/3913247 to your computer and use it in GitHub Desktop.
Save Xjs/3913247 to your computer and use it in GitHub Desktop.
schaltjahr
divides :: Int -> Int -> Bool
d `divides` n = n `mod` d == 0
schaltjahr :: Int -> Bool
schaltjahr n | 400 `divides` n = True
| 100 `divides` n = False
| 4 `divides` n = True
| otherwise = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment