haskell-lectures/VL1/content/VL1_write_haskell12.tex
2015-04-20 00:51:14 +02:00

7 lines
228 B
TeX

And we can again \emph{pattern match} on our \code{WeekDay} type. Let's find out if a given day is a Monday:
\pause
\begin{haskellcode}
isMonday :: WeekDay -> Bool
isMonday Monday = True
isMonday x = False
\end{haskellcode}