[Haskell-beginners] print all days of calendar

Daniel Fischer daniel.is.fischer at web.de
Mon Dec 21 13:54:09 EST 2009


Am Montag 21 Dezember 2009 17:39:49 schrieb kane96 at gmx.de:
> > Prelude> :t filter
> > filter :: (a -> Bool) -> [a] -> [a]
> >
> > So we need a predicate on the type of list elements.
> >
> > getMonth month cal = filter predicate cal
> >       where
> >         predicate (d,m,y) = ??
>
> it has to match the given month and year. But don't know how to define it.

Does (==) ring a few bells?



More information about the Beginners mailing list