cws/main_cw03.tex
changeset 500 fd7f8aff848c
parent 498 0f1b97538ad4
child 502 5321311c02ad
equal deleted inserted replaced
499:2f33c51cac48 500:fd7f8aff848c
   506   \mbox{}\hfill[1 Mark]
   506   \mbox{}\hfill[1 Mark]
   507 \end{itemize}
   507 \end{itemize}
   508 
   508 
   509 \subsection*{Background}
   509 \subsection*{Background}
   510 
   510 
   511 Although easily implementable in Scala (ok maybe the \texttt{simp} functions and
   511 Although easily implementable in Scala (ok maybe the \texttt{simp} function and
   512 the constructors \texttt{ALT}/\texttt{SEQ}/\texttt{AND} needs a bit more thinking), the idea behind the
   512 the constructors \texttt{ALT}/\texttt{SEQ}/\texttt{AND} needs a bit more thinking), the idea behind the
   513 derivative function might not so easy to be seen. To understand its
   513 derivative function might not so easy to be seen. To understand its
   514 purpose better, assume a regular expression $r$ can match strings of
   514 purpose better, assume a regular expression $r$ can match strings of
   515 the form $c\!::\!cs$ (that means strings which start with a character
   515 the form $c\!::\!cs$ (that means strings which start with a character
   516 $c$ and have some rest, or tail, $cs$). If you take the derivative of
   516 $c$ and have some rest, or tail, $cs$). If you take the derivative of