haskell-lectures/VL1/content/VL1_write_haskell12.tex

7 lines
228 B
TeX
Raw Normal View History

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}