equal
deleted
inserted
replaced
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 |