Five weekends: Difference between revisions

m
Line 2,993:
[1 .. 12] >>=
\m ->
[ (y, m)
| isFriday (fromGregorian y m 1), gregorianMonthLength y m == 31 ]
, gregorianMonthLength y m == 31 ]
 
isFriday :: Day -> Bool
Line 3,015 ⟶ 3,016:
xs
years
n = (length . concat) $ xs
(putStrLn . intercalate "\n\n")
[ "How many five-weekend months 1900-2100 ?"
Line 3,026 ⟶ 3,027:
, '\t' : show (length lean)
, "Which years are lean ?"
, unlines (('\t' :) <$> (fmap (unwords . (fmap show <$>)) <$> (chunksOf 5 lean))
]</lang>
{{Out}}
9,655

edits