
21 Dec
2009
21 Dec
'09
3:12 p.m.
Am Montag 21 Dezember 2009 20:47:38 schrieb kane96@gmx.de:
Does (==) ring a few bells?
not really...
Prelude> let okay k = k^3 `mod` 13 == 5 in filter okay [1 .. 30] [7,8,11,20,21,24] Now, you don't want the numbers between 1 and 30 inclusive whose cube modulo 13 is 5, but the dates in a given month. getMonth :: Month -> Calendar -> Calendar getMonth month [(1,Jan,y),(2,Jan,y) ... (31,Dec,y)]