14         style=mystyle,  | 
    15         style=mystyle,  | 
    15         numbersep=0pt,  | 
    16         numbersep=0pt,  | 
    16         numbers=none,  | 
    17         numbers=none,  | 
    17         xleftmargin=0mm}  | 
    18         xleftmargin=0mm}  | 
    18   | 
    19   | 
    19 \newcommand{\bl}[1]{\textcolor{blue}{#1}}      | 
    20 \newcommand{\bl}[1]{\textcolor{blue}{#1}}     | 
         | 
    21   | 
         | 
    22 \newcommand{\RIGHTarrow}[3]{% | 
         | 
    23 \begin{textblock}{0}(#2,#3)% | 
         | 
    24 \onslide<#1>{% | 
         | 
    25 \begin{tikzpicture}% | 
         | 
    26 \node at (0,0) [single arrow, shape border rotate=0, fill=red,text=red]{a};% | 
         | 
    27 \end{tikzpicture}}% | 
         | 
    28 \end{textblock}} | 
         | 
    29 \newcommand{\LEFTarrow}[3]{% | 
         | 
    30 \begin{textblock}{0}(#2,#3)% | 
         | 
    31 \onslide<#1>{% | 
         | 
    32 \begin{tikzpicture}% | 
         | 
    33 \node at (0,0) [single arrow, shape border rotate=180, fill=red,text=red]{a};% | 
         | 
    34 \end{tikzpicture}}% | 
         | 
    35 \end{textblock}} | 
         | 
    36 \newcommand{\DOWNarrow}[3]{% | 
         | 
    37 \begin{textblock}{0}(#2,#3)% | 
         | 
    38 \onslide<#1>{% | 
         | 
    39 \begin{tikzpicture}% | 
         | 
    40 \node at (0,0) [single arrow, shape border rotate=270, fill=red,text=red]{a};% | 
         | 
    41 \end{tikzpicture}}% | 
         | 
    42 \end{textblock}} | 
    20   | 
    43   | 
    21 % beamer stuff   | 
    44 % beamer stuff   | 
    22 \renewcommand{\slidecaption}{PEP (Scala) \liningnums{01}, King's College London} | 
    45 \renewcommand{\slidecaption}{PEP (Scala) \liningnums{01}, King's College London} | 
    23   | 
    46   | 
    24 %https://insights.stackoverflow.com/survey/2019#technology-most-loved-dreaded-and-wanted  | 
    47 %https://insights.stackoverflow.com/survey/2019#technology-most-loved-dreaded-and-wanted  | 
   182   | 
   183   | 
   183 \end{frame} | 
   184 \end{frame} | 
   184 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   185   | 
   186   | 
   186 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   187 \begin{frame}[c] | 
   188 \begin{frame}[t] | 
   188   \frametitle{\bf | 
   189 \frametitle{Why Scala?} | 
   189   \only<1>{\begin{tabular}{l}\\[2mm]Why Scala?\\ \mbox{}\end{tabular}} | 
   190   | 
   190   \only<2->{\begin{tabular}{c}\\[2mm]Why Functional\\[-2mm] Programming?\end{tabular}} | 
   191 \onslide<2->{% | 
         | 
   192 \begin{center}  | 
         | 
   193 {\large\bf{}Money?}\bigskip\\   | 
         | 
   194 \begin{tabular}{@{}c@{}c@{}} | 
         | 
   195 \includegraphics[scale=0.2]{../pics/salary1.png} & | 
         | 
   196 \includegraphics[scale=0.2]{../pics/salary2.png}\\ | 
         | 
   197 \multicolumn{2}{r@{}}{\footnotesize$^*$ source: Stackoverflow Developer Survey, 2019} | 
         | 
   198 \end{tabular}   | 
         | 
   199 \end{center} | 
         | 
   200 \RIGHTarrow{2}{2.3}{5.45} | 
         | 
   201 \DOWNarrow{2}{10.1}{3.6} | 
         | 
   202 }  | 
         | 
   203   | 
         | 
   204   | 
         | 
   205 \small  | 
         | 
   206 Elm, Rust, Haskell, Ocaml, F$\#$, Erlang, ML, Lisp (Racket)\ldots   | 
         | 
   207   | 
         | 
   208 \only<3>{ | 
         | 
   209 \begin{textblock}{6}(3.3,6.2) | 
         | 
   210 \begin{bubble}[6.5cm] | 
         | 
   211 \bf\huge\textcolor{RoyalBlue}{Functional Programming!} | 
         | 
   212 \end{bubble} | 
         | 
   213 \end{textblock}} | 
         | 
   214   | 
         | 
   215 \end{frame} | 
         | 
   216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   | 
         | 
   217   | 
         | 
   218   | 
         | 
   219 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
         | 
   220 \begin{frame}[c] | 
         | 
   221   \frametitle{\begin{tabular}{c}\\[2mm] | 
         | 
   222   Why Functional\\[-2mm] Programming?\end{tabular} | 
   191 }  | 
   223 }  | 
   192   | 
   224   | 
   193   %  | 
   225   %  | 
   194   \mbox{}\\[3.5cm] | 
   226   \mbox{}\\[3.5cm] | 
   195   \small  | 
   227   \small  | 
   196 Scala, Elm, Haskell, Ocaml, F$\sharp$, Erlang, ML, Lisp (Racket), \ldots   | 
   228 Elm, Haskell, Ocaml, F$\#$, Erlang, ML, Lisp (Racket)\ldots   | 
   197   | 
   229   | 
   198 \only<3>{ | 
   230 \only<2>{ | 
   199 \begin{textblock}{6}(2,6.2) | 
   231 \begin{textblock}{6}(1.3,6.2) | 
   200 \begin{bubble}[10cm] | 
   232 \begin{bubble}[10cm] | 
   201 \normalsize``If you want to see which features will be in mainstream programming  | 
   233 \normalsize``If you want to see which features will be in mainstream programming  | 
   202   languages tomorrow, then take a look at functional programming  | 
   234   languages tomorrow, then take a look at functional programming  | 
   203   languages today.''\medskip\small\\  | 
   235   languages today.''\medskip\small\\  | 
   204   \hfill{}---Simon Peyton Jones (works at Microsoft)\\ | 
   236   \hfill{}---Simon Peyton Jones (works at Microsoft)\\ | 
   205   \hfill{}main developer of the Glasgow Haskell Compiler | 
   237   \hfill{}main developer of the Glasgow Haskell Compiler | 
   206 \end{bubble} | 
   238 \end{bubble} | 
   207 \end{textblock}} | 
   239 \end{textblock}} | 
   208   | 
   240   | 
   209 \only<4>{ | 
   241 \only<3>{ | 
   210 \begin{textblock}{6}(5,5.8) | 
   242 \begin{textblock}{6}(5,5.8) | 
   211 \hspace{2mm}\includegraphics[scale=0.06]{../pics/assign.jpg}\\[-1mm] | 
   243 \hspace{2mm}\includegraphics[scale=0.06]{../pics/assign.jpg}\\[-1mm] | 
   212 \Large\alert{\textbf{Immutability}} | 
   244 \Large\alert{\hspace{5mm}\textbf{Immutability}} | 
   213 \end{textblock}} | 
   245 \end{textblock}} | 
   214   | 
   246   | 
   215   | 
   247   | 
   216 \end{frame} | 
   248 \end{frame} | 
   217 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   | 
   249 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   | 
         | 
   250   | 
         | 
   251 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
         | 
   252 \begin{frame}[c] | 
         | 
   253   | 
         | 
   254 \begin{center}   | 
         | 
   255 \includegraphics[scale=0.4]{../pics/pure.png} | 
         | 
   256 \end{center} | 
         | 
   257   | 
         | 
   258 \begin{textblock}{6}(9,14) | 
         | 
   259 \tiny$^*$ from ``What pure functional programming is all about?''  | 
         | 
   260 \end{textblock} | 
         | 
   261 \end{frame} | 
         | 
   262 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
         | 
   263     | 
   218   | 
   264   | 
   219 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   265 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   220 \begin{frame}[c, fragile] | 
   266 \begin{frame}[c, fragile] | 
   221   | 
   267   | 
   222 {\Large Why bother? or\smallskip\\\hfill What is wrong with this?}\bigskip\bigskip | 
   268 {\Large Why bother? or\smallskip\\\hfill What is wrong with this?}\bigskip\bigskip | 
   458 %\end{frame} | 
   504 %\end{frame} | 
   459 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     | 
   505 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     | 
   460   | 
   506   | 
   461 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   507 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   462 \begin{frame}[c] | 
   508 \begin{frame}[c] | 
         | 
   509   \frametitle{Coursework Dates} | 
         | 
   510     | 
         | 
   511 Similar to C++:\bigskip  | 
         | 
   512   | 
         | 
   513 \begin{itemize} | 
         | 
   514   \item Preliminary Parts: Wednesdays 4pm  | 
         | 
   515     \begin{itemize} | 
         | 
   516       \item Preliminary Part 6: 3\% (13 November)  | 
         | 
   517       \item Preliminary Part 7: 4\% (20 November)  | 
         | 
   518       \item Preliminary Part 8: 4\% (27 November)  | 
         | 
   519       \item Preliminary Part 9: 4\% (5 December)   | 
         | 
   520     \end{itemize}\medskip     | 
         | 
   521   \item Core Part: 35\% (15 January 2020)   | 
         | 
   522     | 
         | 
   523 \end{itemize} | 
         | 
   524 \end{frame} | 
         | 
   525   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
         | 
   526     | 
         | 
   527   | 
         | 
   528   | 
         | 
   529 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
         | 
   530 \begin{frame}[c] | 
   463 \frametitle{Coursework} | 
   531 \frametitle{Coursework} | 
   464   | 
   532   | 
   465 \begin{itemize} | 
   533 \begin{itemize} | 
   466 \item Sorry, I might have been a bit wordy:\\  | 
   534 \item Sorry, I might have been a bit wordy:\\  | 
   467   Part 6 of CW description is 7 pages, but  | 
   535   Part 6 of CW description is 7 pages, but  | 
   468   I only needed \mbox{< 100} loc for \emph{all} Part 6.\bigskip | 
   536   I only needed \mbox{< 100} loc for \emph{all} Part 6.\bigskip | 
   469   | 
   537   | 
   470 \item there is feedback when pushing code to github\medskip  | 
   538 \item there is feedback when pushing code to github\medskip  | 
   471   | 
   539   | 
   472 \item there are \texttt{jar}-files you can use to test my implementation\bigskip | 
   540 \item there are \texttt{jar}-files you can use to test  | 
   473     | 
   541   my reference implementation\bigskip  | 
   474 \item we want you to learn FP!\\ \alert{\bf no vars}, no mutable | 
   542     | 
   475   data-structures\\ e.g.~no \texttt{Arrays}, no \texttt{ListBuffer} | 
   543 \item we want you to learn FP!\smallskip\\ \alert{\bf no vars}, no mutable | 
         | 
   544   data-structures\\ \quad{}e.g.~no \texttt{Arrays}, no \texttt{ListBuffer} | 
   476 \end{itemize} | 
   545 \end{itemize} | 
         | 
   546   | 
         | 
   547 \LEFTarrow{1}{11}{11.8} | 
   477 \end{frame} | 
   548 \end{frame} | 
   478 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   549 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   479   | 
   550   | 
   480 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       | 
   551 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       | 
   481   | 
   552   | 
   657 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   | 
   728 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   | 
   658   | 
   729   | 
   659   | 
   730   | 
   660 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   731 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 
   661 \begin{frame}[c] | 
   732 \begin{frame}[c] | 
   662 \frametitle{Conclusion} | 
   733 \frametitle{Conclusion for Today} | 
   663   | 
   734   | 
   664 \begin{itemize} | 
   735 \begin{itemize} | 
   665 \item Scala is still under heavy development\\ (the compiler is terribly slow)\medskip  | 
   736 \item Scala is still under development, 2.13.1 came out in Sept.\\   | 
         | 
   737   (the compiler is terribly slow)\medskip  | 
   666 \item {\bf\url{http://www.scala-lang.org/}}\bigskip | 
   738 \item {\bf\url{http://www.scala-lang.org/}}\bigskip | 
   667     | 
   739     | 
   668 \item it is a rather \textbf{\alert{deep}} language\ldots i.e.~gives | 
   740 \item it is a rather \textbf{\alert{deep}} language\ldots i.e.~gives | 
   669   you a lot of rope to shoot yourself\bigskip  | 
   741   you a lot of rope to shoot yourself\bigskip  | 
   670   | 
   742   |