| 22 |      1 | \documentclass[dvipsnames,14pt,t,xelatex]{beamer}
 | 
|  |      2 | \usepackage{../slides}
 | 
| 32 |      3 | \usepackage{../graphics}
 | 
| 22 |      4 | \usepackage{../langs}
 | 
|  |      5 | %\usepackage{../data}
 | 
|  |      6 | 
 | 
|  |      7 | \hfuzz=220pt 
 | 
|  |      8 | 
 | 
|  |      9 | %\setmonofont[Scale=.88]{Consolas}
 | 
|  |     10 | %\newfontfamily{\consolas}{Consolas}
 | 
|  |     11 | 
 | 
|  |     12 | \lstset{language=Scala,
 | 
|  |     13 |         style=mystyle,
 | 
|  |     14 |         numbersep=0pt,
 | 
|  |     15 |         numbers=none,
 | 
|  |     16 |         xleftmargin=0mm}
 | 
|  |     17 | 
 | 
|  |     18 | \newcommand{\bl}[1]{\textcolor{blue}{#1}}     
 | 
|  |     19 | 
 | 
|  |     20 | % beamer stuff 
 | 
| 195 |     21 | \renewcommand{\slidecaption}{PEP (Scala) \liningnums{01}, King's College London}
 | 
| 22 |     22 | 
 | 
| 278 |     23 | %https://insights.stackoverflow.com/survey/2019#technology-most-loved-dreaded-and-wanted
 | 
| 22 |     24 | 
 | 
|  |     25 | \begin{document}
 | 
|  |     26 | 
 | 
|  |     27 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |     28 | \begin{frame}[t]
 | 
|  |     29 | \frametitle{%
 | 
|  |     30 |   \begin{tabular}{@ {}c@ {}}
 | 
|  |     31 |   \\[5mm]
 | 
| 199 |     32 |   \hspace{7mm}\huge PEP Scala (\liningnums{1}) 
 | 
| 22 |     33 |   \end{tabular}}
 | 
|  |     34 | 
 | 
|  |     35 |   \normalsize
 | 
|  |     36 |   \begin{center}
 | 
|  |     37 |   \begin{tabular}{ll}
 | 
| 137 |     38 |     Email:  & christian.urban at kcl.ac.uk\\
 | 
| 195 |     39 |     Office: & N\liningnums{7.07} (North Wing, Bush House)\\
 | 
| 137 |     40 |     Slides \& Code: & KEATS\medskip\\
 | 
| 199 |     41 |     Office Hours: &  Mondays 12:00 -- 14:00\\
 | 
|  |     42 |            & \alert{except next week: Tuesday}
 | 
| 22 |     43 |   \end{tabular}
 | 
|  |     44 |   \end{center}
 | 
|  |     45 | 
 | 
| 199 |     46 |   %\tiny
 | 
|  |     47 |   %developed since 2004 bv Martin Odersky
 | 
|  |     48 |   %picture about assignments
 | 
|  |     49 | 
 | 
|  |     50 | \begin{textblock}{6}(0.5,0.5)
 | 
|  |     51 | \includegraphics[scale=0.035]{../pics/assign.jpg}\\[-1mm]
 | 
|  |     52 | \end{textblock}
 | 
| 22 |     53 | 
 | 
|  |     54 | \end{frame}
 | 
|  |     55 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |     56 | 
 | 
|  |     57 | 
 | 
|  |     58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |     59 | \begin{frame}[c]
 | 
|  |     60 | \frametitle{Why Scala?}
 | 
|  |     61 | 
 | 
| 23 |     62 | \begin{textblock}{6}(3,4)
 | 
| 22 |     63 | \begin{tabular}{l}
 | 
|  |     64 | \mbox{}\hspace{-1mm}\includegraphics[scale=0.36]{../pics/twitter.png}\\[-1mm]
 | 
|  |     65 | \includegraphics[scale=0.30]{../pics/linked.png}\\
 | 
| 141 |     66 | \includegraphics[scale=0.30]{../pics/guardian.jpg}\\[-3mm]
 | 
| 22 |     67 | \mbox{}\hspace{-2mm}\includegraphics[scale=0.38]{../pics/morgan.png}\\[-3mm]
 | 
|  |     68 | \includegraphics[scale=0.30]{../pics/suisse.png}\\
 | 
| 23 |     69 | {\large\bf ...}
 | 
|  |     70 | \end{tabular}
 | 
|  |     71 | \end{textblock}
 | 
|  |     72 | 
 | 
|  |     73 | \begin{textblock}{6}(9,4)
 | 
|  |     74 | \begin{tabular}{l}
 | 
| 22 |     75 | \includegraphics[scale=0.20]{../pics/edf.png}\\[-1mm]
 | 
|  |     76 | \includegraphics[scale=0.08]{../pics/novell.png}\\[-1mm]
 | 
|  |     77 | \includegraphics[scale=0.30]{../pics/foursquare.png}\\
 | 
|  |     78 | \includegraphics[scale=0.30]{../pics/hsbc.png}\\
 | 
|  |     79 | {\large\bf ...}
 | 
|  |     80 | \end{tabular}
 | 
|  |     81 | \end{textblock}
 | 
|  |     82 | 
 | 
| 199 |     83 | 
 | 
|  |     84 | \begin{textblock}{6}(2,12)
 | 
|  |     85 | \begin{bubble}[9cm]
 | 
|  |     86 |   \small
 | 
|  |     87 |   developed since 2004 by Martin Odersky\\
 | 
| 200 |     88 |   (he was behind Generic Java which was included in Java 5
 | 
|  |     89 |   \ldots I am using it maybe since 2008?)
 | 
| 199 |     90 | \end{bubble}
 | 
|  |     91 | \end{textblock}
 | 
|  |     92 | 
 | 
| 22 |     93 | \end{frame}
 | 
|  |     94 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |     95 | 
 | 
| 174 |     96 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 199 |     97 | %\begin{frame}[c]
 | 
|  |     98 | %\frametitle{Why Scala?}
 | 
|  |     99 | %
 | 
|  |    100 | %In the last few years there is  a ``Cambrian explosion'' of
 | 
|  |    101 | %languages from both academia and industry.
 | 
|  |    102 | %
 | 
|  |    103 | %It is essential for students to have skills to pick up new languages
 | 
|  |    104 | %quickly.
 | 
|  |    105 | %
 | 
|  |    106 | %\end{frame}
 | 
| 174 |    107 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    108 | 
 | 
| 23 |    109 | 
 | 
|  |    110 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    111 | \begin{frame}[c]
 | 
|  |    112 | \frametitle{Why Scala?}
 | 
|  |    113 | 
 | 
|  |    114 | \begin{itemize}
 | 
| 34 |    115 | \item compiles to the JVM\\
 | 
|  |    116 |   \textcolor{gray}{(also JavaScript, native X86 in the works)}\medskip
 | 
| 32 |    117 | \item integrates seamlessly with Java\medskip
 | 
| 33 |    118 | \item combines \underline{\bf functional} and {\bf object-oriented} programming\bigskip
 | 
| 34 |    119 | \item it is a bit on the ``mathematical'' side\\
 | 
| 199 |    120 |   \textcolor{gray}{(no pointers, no \texttt{null}, but expressions)}
 | 
| 34 |    121 |   
 | 
| 33 |    122 | \item often one can write very concise and elegant code
 | 
|  |    123 | \end{itemize}\bigskip\medskip  
 | 
|  |    124 | 
 | 
|  |    125 | \small
 | 
| 137 |    126 | alternatives:\\
 | 
| 140 |    127 | Elm, Haskell, Ocaml, F$\sharp$, Erlang, ML, Lisp (Racket), \ldots
 | 
| 23 |    128 | 
 | 
|  |    129 | \end{frame}
 | 
| 22 |    130 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
| 23 |    131 | 
 | 
|  |    132 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    133 | \begin{frame}[c]
 | 
| 32 |    134 | \frametitle{Java vs Scala}
 | 
|  |    135 | 
 | 
|  |    136 | {\lstset{language=java}\fontsize{12}{12}\selectfont
 | 
|  |    137 | \texttt{\lstinputlisting{Point.java}}}
 | 
|  |    138 | 
 | 
| 33 |    139 | \rule{11cm}{0.3mm}\\[-2mm]
 | 
|  |    140 | 
 | 
| 32 |    141 | {\lstset{language=scala}\fontsize{12}{12}\selectfont
 | 
|  |    142 | \texttt{\lstinputlisting{Point.scala}}}
 | 
|  |    143 | 
 | 
|  |    144 | \begin{textblock}{6}(13,3)
 | 
|  |    145 | \textbf{\large Java}
 | 
| 33 |    146 | \end{textblock}
 | 
|  |    147 | 
 | 
| 200 |    148 | \begin{textblock}{6}(13,13.6)
 | 
| 32 |    149 | \textbf{\large Scala}
 | 
|  |    150 | \end{textblock}  
 | 
|  |    151 | 
 | 
|  |    152 | \end{frame}
 | 
|  |    153 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    154 | 
 | 
| 33 |    155 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 199 |    156 | %\begin{frame}[c]
 | 
|  |    157 | %\frametitle{Scala (imperative) vs Scala (functional)}
 | 
|  |    158 | %
 | 
|  |    159 | %Reham's example
 | 
|  |    160 | %
 | 
|  |    161 | %
 | 
|  |    162 | %\end{frame}
 | 
| 174 |    163 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    164 | 
 | 
|  |    165 | 
 | 
|  |    166 | 
 | 
|  |    167 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    168 | \begin{frame}[c]
 | 
| 137 |    169 | \frametitle{First Steps: Scala Tools}
 | 
| 32 |    170 | 
 | 
| 33 |    171 | \begin{itemize}
 | 
| 200 |    172 | \item I use VS Code and a Scala extension (M'place)
 | 
| 199 |    173 | \begin{center}  
 | 
|  |    174 | \includegraphics[scale=0.10]{../pics/vscode.png}\\[-10mm]\mbox{}
 | 
|  |    175 | \end{center}\bigskip
 | 
|  |    176 |   
 | 
| 33 |    177 | \item there is a plugin for Eclipse (called Scala IDE)\medskip
 | 
| 137 |    178 | \item there is also a plugin for IntelliJ\medskip
 | 
| 33 |    179 | \end{itemize}  
 | 
|  |    180 | 
 | 
|  |    181 | \end{frame}
 | 
| 137 |    182 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    183 | 
 | 
|  |    184 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    185 | \begin{frame}[c]
 | 
|  |    186 |   \frametitle{\bf
 | 
|  |    187 |   \only<1>{\begin{tabular}{l}\\[2mm]Why Scala?\\ \mbox{}\end{tabular}}
 | 
| 200 |    188 |   \only<2->{\begin{tabular}{c}\\[2mm]Why Functional\\[-2mm] Programming?\end{tabular}}
 | 
| 137 |    189 | }
 | 
|  |    190 | 
 | 
|  |    191 |   %
 | 
|  |    192 |   \mbox{}\\[3.5cm]
 | 
|  |    193 |   \small
 | 
| 140 |    194 | Scala, Elm, Haskell, Ocaml, F$\sharp$, Erlang, ML, Lisp (Racket), \ldots 
 | 
| 137 |    195 | 
 | 
|  |    196 | \only<3>{
 | 
|  |    197 | \begin{textblock}{6}(2,6.2)
 | 
|  |    198 | \begin{bubble}[10cm]
 | 
|  |    199 | \normalsize``If you want to see which features will be in mainstream programming
 | 
|  |    200 |   languages tomorrow, then take a look at functional programming
 | 
|  |    201 |   languages today.''\medskip\small\\
 | 
|  |    202 |   \hfill{}---Simon Peyton Jones (works at Microsoft)\\
 | 
|  |    203 |   \hfill{}main developer of the Glasgow Haskell Compiler
 | 
|  |    204 | \end{bubble}
 | 
|  |    205 | \end{textblock}}
 | 
|  |    206 | 
 | 
| 200 |    207 | \only<4>{
 | 
|  |    208 | \begin{textblock}{6}(5,5.8)
 | 
|  |    209 | \hspace{2mm}\includegraphics[scale=0.06]{../pics/assign.jpg}\\[-1mm]
 | 
|  |    210 | \Large\alert{\textbf{Immutability}}
 | 
|  |    211 | \end{textblock}}
 | 
|  |    212 | 
 | 
|  |    213 | 
 | 
| 137 |    214 | \end{frame}
 | 
|  |    215 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    216 | 
 | 
| 200 |    217 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    218 | \begin{frame}[c, fragile]
 | 
|  |    219 | 
 | 
|  |    220 | {\Large Why bother? or\smallskip\\\hfill What is wrong with this?}\bigskip\bigskip
 | 
|  |    221 | 
 | 
|  |    222 |   
 | 
|  |    223 | \begin{lstlisting}[language=C,numbers=none]
 | 
|  |    224 | for (int i = 10; i < 20; i++) {
 | 
|  |    225 |     
 | 
|  |    226 |   //...Do something interesting
 | 
|  |    227 |   //   with i...
 | 
|  |    228 | 
 | 
|  |    229 | }
 | 
|  |    230 | \end{lstlisting}
 | 
|  |    231 | 
 | 
|  |    232 |   
 | 
|  |    233 | \end{frame}
 | 
|  |    234 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    235 | 
 | 
|  |    236 | 
 | 
|  |    237 | 
 | 
| 137 |    238 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    239 | \begin{frame}[c]
 | 
|  |    240 | \mbox{}\\[-21mm]\mbox{}  
 | 
|  |    241 | 
 | 
|  |    242 | \begin{center}
 | 
|  |    243 |   \begin{tikzpicture}[scale=1,
 | 
|  |    244 |                       node/.style={
 | 
|  |    245 |                       rectangle,rounded corners=3mm,
 | 
|  |    246 |                       very thick,draw=black!50,
 | 
|  |    247 |                       minimum height=18mm, minimum width=20mm,
 | 
|  |    248 |                       top color=white,bottom color=black!20}]
 | 
|  |    249 | 
 | 
|  |    250 |   \onslide<1-10>{                
 | 
|  |    251 |   \node (A) at (0,0) [node]
 | 
|  |    252 |      {\mbox{\includegraphics[scale=0.15]{../pics/cplus2.jpg}}};
 | 
|  |    253 |   \node [above right] at (A.north west) {1986};}
 | 
|  |    254 | 
 | 
|  |    255 |   \onslide<2->{
 | 
|  |    256 |   \node (B) at (3.5,0) [node]
 | 
|  |    257 |      {\mbox{\includegraphics[scale=0.15]{../pics/robotron.jpg}}};
 | 
|  |    258 |   \node [above right] at (B.north west) {1988, C};
 | 
|  |    259 |   \draw [->,line width=4mm] (A) -- (B);}
 | 
|  |    260 | 
 | 
|  |    261 |   \onslide<3->{
 | 
|  |    262 |   \node (C0) at (6.3,0) {};
 | 
|  |    263 |   \node (C) at (8,0)  [node]
 | 
|  |    264 |      {\mbox{\includegraphics[scale=0.15]{../pics/sun.jpg}}};
 | 
|  |    265 |   \node [above right] at (C.north west) {1992, {\small Linux}};
 | 
|  |    266 |   \draw [->,line width=4mm] (B) -- (C0);
 | 
|  |    267 |   \draw [->,line width=4mm] (C0) -- (C);}
 | 
|  |    268 | 
 | 
|  |    269 |   \onslide<4->{
 | 
|  |    270 |   \node (D) at (8,-3.3)  [node]
 | 
|  |    271 |      {\mbox{\includegraphics[scale=0.2]{../pics/gateway.jpg}}};
 | 
|  |    272 |   \draw [->,line width=4mm] (C) -- (D);
 | 
|  |    273 |   \node [below right] at (D.south west) {1996};}
 | 
|  |    274 | 
 | 
|  |    275 |   \onslide<5->{
 | 
|  |    276 |   \node (E) at (4,-3.3)  [node]
 | 
|  |    277 |      {\mbox{\includegraphics[scale=0.1]{../pics/appleg4.jpg}}};
 | 
|  |    278 |   \draw [->,line width=4mm] (D) -- (E);
 | 
|  |    279 |   \node [above right] at (E.north west) {2000};}   
 | 
|  |    280 | 
 | 
|  |    281 |   \onslide<6->{
 | 
|  |    282 |   \node (F0) at (1.5,-3.3) {};
 | 
|  |    283 |   \node (F1) at (1,-3.3) {};
 | 
|  |    284 |   \node (F) at (-0.9,-3.3)  [node]
 | 
|  |    285 |      {\mbox{\includegraphics[scale=0.3]{../pics/appleair.png}}};
 | 
|  |    286 |   \draw [->,line width=4mm] (E) -- (F0);
 | 
|  |    287 |   \draw [->,line width=4mm] (F1) -- (F);   
 | 
|  |    288 |   \node [above right] at (F.north west) {2012?};}   
 | 
|  |    289 | 
 | 
|  |    290 |   \onslide<7->{
 | 
|  |    291 |   \node (G) at (-0.9,-6.3)  [node]
 | 
|  |    292 |      {\mbox{\includegraphics[scale=0.02]{../pics/applepro.jpg}}};
 | 
|  |    293 |   \draw [->,line width=4mm] (F) -- (G);
 | 
|  |    294 |   \node [right] at (G.west) {\hspace{22mm}2017};}   
 | 
|  |    295 |   
 | 
|  |    296 |   \end{tikzpicture}
 | 
|  |    297 |   \end{center}
 | 
|  |    298 | 
 | 
|  |    299 | 
 | 
|  |    300 |   \only<1>{%  
 | 
|  |    301 |     \begin{textblock}{10}(2.5,5)  
 | 
|  |    302 |       \includegraphics[scale=0.26]{../pics/cplus1.jpg}\\
 | 
|  |    303 |       \footnotesize 64K RAM, no HD, no monitor, lots of cables
 | 
|  |    304 |     \end{textblock}
 | 
|  |    305 |     \begin{textblock}{6}(10.9,4.5)  
 | 
|  |    306 |       \includegraphics[scale=0.09]{../pics/mand1.png}
 | 
|  |    307 |       \includegraphics[scale=0.09]{../pics/mand2.png}
 | 
|  |    308 |     \end{textblock}
 | 
|  |    309 |     \begin{textblock}{6}(10.8,2.2)  
 | 
|  |    310 |     \huge\bf 3 days
 | 
|  |    311 |     \end{textblock}
 | 
|  |    312 |   }
 | 
|  |    313 |   \only<8->{%
 | 
|  |    314 |   \begin{textblock}{8}(5.8,11.6)  
 | 
|  |    315 |     \large\bf
 | 
|  |    316 |     \begin{tabular}{l@{}l}
 | 
|  |    317 |       1986:\, & no Internet\\
 | 
|  |    318 |             & no Amazon\\
 | 
|  |    319 |             & no FB, no mobiles,\ldots\\ 
 | 
|  |    320 |     \end{tabular}         
 | 
|  |    321 |     \end{textblock}
 | 
|  |    322 |   }
 | 
|  |    323 |   \only<9>{
 | 
|  |    324 |   \begin{textblock}{1}(3,3)
 | 
|  |    325 |     \begin{bubble}[9cm]  
 | 
|  |    326 |       \begin{tabular}{@{\hspace{8mm}}llll@{\hspace{8mm}}}
 | 
|  |    327 |         \\
 | 
| 200 |    328 |       \multicolumn{4}{c}{\alert{\bf Speedup by Moore's Law}}\medskip\\
 | 
| 137 |    329 |       \textbf{1986:} & 3 days    & \textbf{1996:} & 135 mins\\
 | 
|  |    330 |       \textbf{1988:} & 1.5 days  & \textbf{1998:} & 67 mins\\
 | 
|  |    331 |       \textbf{1990:} & 18 hs     & \textbf{2000:} & 33 mins\\
 | 
|  |    332 |       \textbf{1992:} & 9 hs      & \textbf{2002:} & 16 mins\\
 | 
|  |    333 |       \textbf{1994:} & 4.5 hs    & \multicolumn{2}{c}{???}\\                    
 | 
|  |    334 |       \\
 | 
|  |    335 |       \end{tabular}
 | 
|  |    336 |       \small Every two years, computers got twice as powerful.
 | 
|  |    337 |   \end{bubble}
 | 
|  |    338 |   \end{textblock}}
 | 
|  |    339 | 
 | 
|  |    340 | \end{frame}
 | 
|  |    341 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    342 | 
 | 
|  |    343 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    344 | \begin{frame}[c]
 | 
| 200 |    345 | \frametitle{Seq \;vs\; Par}
 | 
| 137 |    346 | 
 | 
|  |    347 | \begin{center}
 | 
|  |    348 |   \begin{tabular}[t]{@{}l@{}l@{}}
 | 
| 200 |    349 |     \includegraphics[scale=0.14]{../pics/mand4.png} & \hspace{4mm}
 | 
|  |    350 |     \raisebox{0mm}{\includegraphics[scale=0.14]{../pics/mand3.png}}\\
 | 
|  |    351 |     \hspace{6mm}\includegraphics[scale=0.5]{../pics/cpu2.png} &
 | 
|  |    352 |     \hspace{11mm}\includegraphics[scale=0.5]{../pics/cpu1.png}
 | 
| 137 |    353 |   \end{tabular}     
 | 
|  |    354 | \end{center}  
 | 
|  |    355 | 
 | 
|  |    356 | \only<2>{
 | 
|  |    357 |   \begin{textblock}{5}(12,2)
 | 
|  |    358 |     \begin{bubble}[2.1cm]
 | 
|  |    359 |       \footnotesize{}in Java or C++\\
 | 
|  |    360 |       \includegraphics[scale=0.50]{../pics/skeleton.jpg}\\
 | 
|  |    361 |     \end{bubble}  
 | 
|  |    362 |   \end{textblock}}
 | 
|  |    363 | 
 | 
|  |    364 | \only<3>{
 | 
| 200 |    365 |   \begin{textblock}{14.2}(1,13.5)
 | 
| 140 |    366 |     In FP: Once a variable is created, it is assigned a value and then
 | 
|  |    367 |     never changed again $\Rightarrow$ no synchronisation\smallskip\\
 | 
| 200 |    368 |     %%\small\textcolor{gray}{(Andrew's second favourite feature of C++)}
 | 
| 137 |    369 |   \end{textblock}}
 | 
|  |    370 | 
 | 
|  |    371 | \end{frame}
 | 
|  |    372 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
 | 
|  |    373 | 
 | 
|  |    374 | 
 | 
|  |    375 | 
 | 
| 32 |    376 | 
 | 
|  |    377 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    378 | \begin{frame}[c]
 | 
| 23 |    379 | \frametitle{Types}
 | 
|  |    380 | 
 | 
|  |    381 | \begin{itemize}
 | 
| 33 |    382 | \item Base types\smallskip
 | 
| 23 |    383 | 
 | 
| 33 |    384 |   \begin{tabular}{@{}l@{}}
 | 
| 23 |    385 |     \textcolor{codegreen}{\texttt{Int}},
 | 
|  |    386 |     \textcolor{codegreen}{\texttt{Long}},
 | 
|  |    387 |     \textcolor{codegreen}{\texttt{BigInt}},
 | 
|  |    388 |     \textcolor{codegreen}{\texttt{Float}},
 | 
|  |    389 |     \textcolor{codegreen}{\texttt{Double}}\\
 | 
|  |    390 |     \textcolor{codegreen}{\texttt{String}},
 | 
| 25 |    391 |     \textcolor{codegreen}{\texttt{Char}}\\
 | 
|  |    392 |     \textcolor{codegreen}{\texttt{Boolean}}
 | 
| 23 |    393 |   \end{tabular}
 | 
|  |    394 | 
 | 
| 33 |    395 | \item Compound types \smallskip   
 | 
| 23 |    396 | 
 | 
| 33 |    397 |   \begin{tabular}{@{}ll@{}}
 | 
| 23 |    398 |     \textcolor{codegreen}{\texttt{List[Int]}}     & lists of Int's \\
 | 
|  |    399 |     \textcolor{codegreen}{\texttt{Set[Double]}}   & sets of Double's \\
 | 
|  |    400 |     \textcolor{codegreen}{\texttt{(Int, String)}} & Int-String pair\\
 | 
|  |    401 |     \textcolor{codegreen}{\texttt{List[(BigInt, String)]}} &
 | 
|  |    402 |                                       lists of BigInt-String\\
 | 
|  |    403 |                                       & pairs\\
 | 
| 200 |    404 |     \textcolor{codegreen}{\texttt{List[List[Int]]}} & list of lists of Int's\\      \textcolor{codegreen}{\texttt{Option[Int]}}     & options of Int's \\                            
 | 
| 23 |    405 |   \end{tabular}
 | 
|  |    406 | 
 | 
|  |    407 | \end{itemize}  
 | 
|  |    408 | 
 | 
|  |    409 | \end{frame}
 | 
|  |    410 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    411 | 
 | 
| 32 |    412 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 200 |    413 | %\begin{frame}[c]
 | 
|  |    414 | %\frametitle{An Http Request}
 | 
| 32 |    415 |   
 | 
| 200 |    416 | %\begin{textblock}{1}(2,5)
 | 
|  |    417 | %\begin{tabular}{c}
 | 
|  |    418 | %\includegraphics[scale=0.15]{../pics/servers.png}\\[-2mm]
 | 
|  |    419 | %\small Server
 | 
|  |    420 | %\end{tabular}
 | 
|  |    421 | %\end{textblock}
 | 
| 32 |    422 | 
 | 
| 200 |    423 | %\begin{textblock}{1}(5.6,4)
 | 
|  |    424 | %  \begin{tikzpicture}[scale=1.1]
 | 
|  |    425 | %  \draw[white] (0,1) node (X) {};
 | 
|  |    426 | %  \draw[white] (2,1) node (Y) {};
 | 
|  |    427 | %   \draw[white] (0,0) node (X1) {};
 | 
|  |    428 | %  \draw[white] (2,0) node (Y1) {};
 | 
|  |    429 | %   \draw[white] (0,-1) node (X2) {};
 | 
|  |    430 | %  \draw[white] (2,-1) node (Y2) {};
 | 
|  |    431 | %  \draw[red, <-, line width = 2mm] (X) -- (Y);
 | 
|  |    432 | %  \node [inner sep=5pt,label=above:\textcolor{black}{GET request}] at ($ (X)!.5!(Y) $) {};
 | 
|  |    433 | %  \draw[red, ->, line width = 2mm] (X1) -- (Y1);
 | 
|  |    434 | %  \node [inner sep=5pt,label=above:\textcolor{black}{webpage}] at ($ (X1)!.5!(Y1) $) {};
 | 
|  |    435 | %  \draw[red, <-, line width = 2mm] (X2) -- (Y2);
 | 
|  |    436 | %  \node [inner sep=7pt,label=above:\textcolor{black}{POST data}] at ($ (X2)!.5!(Y2) $) {};
 | 
|  |    437 | %  \end{tikzpicture}
 | 
|  |    438 | %\end{textblock}
 | 
| 32 |    439 | 
 | 
|  |    440 | 
 | 
| 200 |    441 | %\begin{textblock}{1}(9,5.5)
 | 
|  |    442 | %\begin{tabular}{c}
 | 
|  |    443 | %\includegraphics[scale=0.15]{../pics/laptop.png}\\[-2mm]
 | 
|  |    444 | %\small Browser
 | 
|  |    445 | %\end{tabular}
 | 
|  |    446 | %\end{textblock}
 | 
|  |    447 | %\end{frame}
 | 
| 32 |    448 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    449 | 
 | 
|  |    450 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
| 200 |    451 | %\begin{frame}[c]
 | 
|  |    452 | %
 | 
|  |    453 | %{\lstset{language=Java}\fontsize{7}{8}\selectfont
 | 
|  |    454 | %\texttt{\lstinputlisting{URLReader.java}}}
 | 
|  |    455 | %
 | 
|  |    456 | %\end{frame}
 | 
| 32 |    457 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    458 | 
 | 
| 33 |    459 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    460 | \begin{frame}[c]
 | 
| 140 |    461 | \frametitle{Coursework}
 | 
|  |    462 | 
 | 
|  |    463 | \begin{itemize}
 | 
| 200 |    464 | \item Sorry, I might have been a bit wordy:\\
 | 
| 140 |    465 |   CW description is 7 pages, but
 | 
| 200 |    466 |   I only needed \mbox{< 100} loc for \emph{all} the CW6.\bigskip
 | 
| 140 |    467 | 
 | 
| 200 |    468 | \item there is email feedback when pushing code to github\medskip
 | 
| 140 |    469 | 
 | 
| 200 |    470 | \item there are \texttt{jar}-files you can use to test my implementation\bigskip
 | 
|  |    471 |   
 | 
|  |    472 | \item we want you to learn FP: \alert{\bf no vars}, no mutable
 | 
|  |    473 |   data-structures, e.g.~no \texttt{Arrays}, no \texttt{ListBuffer}
 | 
| 140 |    474 | \end{itemize}
 | 
|  |    475 | \end{frame}
 | 
|  |    476 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    477 | 
 | 
|  |    478 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |    479 | 
 | 
|  |    480 | \begin{frame}[c, fragile]
 | 
|  |    481 | \frametitle{The Joy of Immutability}
 | 
|  |    482 | 
 | 
|  |    483 | \begin{itemize}
 | 
|  |    484 | \item If you need to manipulate some data in a list say, then you make
 | 
|  |    485 |   a new list with the updated values, rather than revise the original
 | 
|  |    486 |   list. Easy!\medskip
 | 
|  |    487 | 
 | 
|  |    488 |   {\small
 | 
|  |    489 |   \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
 | 
|  |    490 |     val old_list = List(1, 2, 3, 5)
 | 
|  |    491 |     val new_list = 0 :: old_list
 | 
|  |    492 |   \end{lstlisting}}  
 | 
|  |    493 |   
 | 
| 200 |    494 | \item You do not have to be defensive about who can access the data.
 | 
|  |    495 | 
 | 
|  |    496 | \item You can look at your code in isolation.  
 | 
| 140 |    497 | \end{itemize}  
 | 
|  |    498 | \end{frame}
 | 
|  |    499 | 
 | 
|  |    500 | 
 | 
|  |    501 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    502 | 
 | 
|  |    503 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    504 | \begin{frame}[t]
 | 
|  |    505 | \frametitle{Email: Hate 'val'}
 | 
|  |    506 | 
 | 
|  |    507 | \mbox{}\\[-25mm]\mbox{}
 | 
|  |    508 | 
 | 
|  |    509 | \begin{center}
 | 
|  |    510 |   \begin{bubble}[10.5cm]
 | 
|  |    511 |   Subject: \textbf{Hate '\textbf{\texttt{val}}'}\hfill 01:00 AM\medskip\\
 | 
|  |    512 | 
 | 
|  |    513 |   Hello Mr Urban,\medskip\\
 | 
|  |    514 | 
 | 
|  |    515 |   I just wanted to ask, how are we suppose to work
 | 
|  |    516 |   with the completely useless \textbf{\texttt{val}}, that can’t be changed ever? Why is
 | 
|  |    517 |   this rule active at all? I’ve spent 4 hours not thinking on the
 | 
|  |    518 |   coursework, but how to bypass this annoying rule. What’s the whole
 | 
|  |    519 |   point of all these coursework, when we can’t use everything Scala
 | 
|  |    520 |   gives us?!?\medskip\\
 | 
|  |    521 | 
 | 
|  |    522 |   Regards.\\
 | 
|  |    523 |   \mbox{}\hspace{5mm}\textcolor{black!50}{<<deleted>>}\\
 | 
|  |    524 |   \end{bubble}
 | 
|  |    525 | \end{center}
 | 
|  |    526 | 
 | 
|  |    527 | \end{frame}
 | 
|  |    528 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |    529 | 
 | 
|  |    530 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    531 | \begin{frame}[c]
 | 
|  |    532 | 
 | 
|  |    533 | \mbox{}\\[-25mm]\mbox{}
 | 
|  |    534 | 
 | 
|  |    535 | \begin{center}
 | 
|  |    536 |   \begin{bubble}[10.5cm]
 | 
|  |    537 |   Subject: \textbf{Re: Hate '\textbf{\texttt{val}}'}\hfill 01:02 AM\bigskip\bigskip\\
 | 
|  |    538 | 
 | 
|  |    539 |   \textcolor{black!70}{
 | 
|  |    540 |     \textit{\large<<my usual rant about fp\ldots\\ concurrency bla bla\ldots{} better programs
 | 
|  |    541 |     yada>>}}\bigskip\bigskip\bigskip
 | 
|  |    542 |   
 | 
|  |    543 |   PS: What are you trying to do where you desperately want to use \texttt{var}?
 | 
|  |    544 |   \end{bubble}
 | 
|  |    545 | \end{center}
 | 
|  |    546 | 
 | 
|  |    547 | \end{frame}
 | 
|  |    548 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |    549 | 
 | 
|  |    550 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    551 | \begin{frame}[c,fragile]
 | 
|  |    552 | 
 | 
|  |    553 | \begin{textblock}{6}(0.5,0.5)
 | 
|  |    554 | \begin{bubble}[11.5cm]
 | 
|  |    555 |   \small  
 | 
|  |    556 |   Subject: \textbf{Re: Re: Hate '\textbf{\texttt{val}}'}\hfill 01:04 AM\medskip\\
 | 
|  |    557 | 
 | 
|  |    558 |   \textbf{Right now my is\_legal function works fine:}
 | 
|  |    559 |   
 | 
|  |    560 | \footnotesize\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
 | 
|  |    561 |  def is_legal(dim: Int, path: Path)(x: Pos): Boolean = {
 | 
|  |    562 |    var boolReturn = false
 | 
|  |    563 |    if(x._1 > dim || x._2 > dim || x._1 < 0 || x._2 < 0) {
 | 
|  |    564 |    else { var breakLoop = false
 | 
|  |    565 |           if(path == Nil) { boolReturn = true }
 | 
|  |    566 |           else { for(i <- 0 until path.length) {
 | 
|  |    567 |                     if(breakLoop == false) {
 | 
|  |    568 |                       if(path(i) == x) {
 | 
|  |    569 |                         boolReturn = true
 | 
|  |    570 |                         breakLoop = true
 | 
|  |    571 |                       }
 | 
|  |    572 |                       else { boolReturn = false }
 | 
|  |    573 |                     } else breakLoop
 | 
|  |    574 |             }
 | 
|  |    575 |           }
 | 
|  |    576 |           boolReturn
 | 
|  |    577 |    }
 | 
|  |    578 | \end{lstlisting}
 | 
|  |    579 | \end{bubble}
 | 
|  |    580 | \end{textblock}
 | 
|  |    581 | 
 | 
|  |    582 | \begin{textblock}{6}(8.2,11.8)
 | 
|  |    583 | \begin{bubble}[5.5cm]\footnotesize\bf
 | 
|  |    584 | \ldots{}but I can’t make it work with boolReturn being val. What approach would
 | 
|  |    585 | you recommend in this case, and is using var in this case justified?
 | 
|  |    586 | \end{bubble}
 | 
|  |    587 | \end{textblock}
 | 
|  |    588 | 
 | 
|  |    589 | \only<2>{
 | 
|  |    590 | \begin{textblock}{6}(0.3,11.8)
 | 
|  |    591 |   \begin{bubble}[3.1cm]
 | 
|  |    592 |     \textbf{Me:}
 | 
|  |    593 |     \raisebox{-12mm}{\includegraphics[scale=0.08]{../pics/throwup.jpg}}
 | 
|  |    594 |   \end{bubble}
 | 
|  |    595 | \end{textblock}}
 | 
|  |    596 | 
 | 
|  |    597 | \end{frame}
 | 
|  |    598 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    599 | 
 | 
|  |    600 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    601 | \begin{frame}[t,fragile]
 | 
|  |    602 | 
 | 
|  |    603 | \mbox{}\\[-25mm]\mbox{}
 | 
|  |    604 | 
 | 
|  |    605 | \begin{textblock}{6}(0.5,2)
 | 
|  |    606 |   \begin{bubble}[11.5cm]
 | 
|  |    607 |   Subject: \textbf{Re: Re: Re: Hate '\textbf{\texttt{val}}'}\hfill 01:06 AM\bigskip\\
 | 
|  |    608 |   \small
 | 
|  |    609 |   
 | 
|  |    610 |   OK. So you want to make sure that the \texttt{x}-position is not outside the
 | 
|  |    611 |   board....and furthermore you want to make sure that the \texttt{x}-position
 | 
|  |    612 |   is not yet in the path list. How about something like\bigskip
 | 
|  |    613 | 
 | 
|  |    614 | \footnotesize\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
 | 
|  |    615 |  def is_legal(dim: Int, path: Path)(x: Pos): Boolean = 
 | 
|  |    616 |    ...<<some board conditions>>... && !path.contains(x)
 | 
|  |    617 | \end{lstlisting}\bigskip
 | 
|  |    618 |   
 | 
|  |    619 |   \small Does not even contain a \texttt{val}.
 | 
|  |    620 |   \end{bubble}
 | 
|  |    621 | \end{textblock}
 | 
|  |    622 | 
 | 
|  |    623 | \begin{textblock}{6}(7,12)
 | 
|  |    624 | \footnotesize\textcolor{black!50}{(This is all on one line)}
 | 
|  |    625 | \end{textblock}
 | 
|  |    626 | 
 | 
|  |    627 | \end{frame}
 | 
|  |    628 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |    629 | 
 | 
|  |    630 | 
 | 
|  |    631 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    632 | \begin{frame}[t,fragile]
 | 
|  |    633 | 
 | 
|  |    634 | \mbox{}\\[-15mm]\mbox{}
 | 
|  |    635 | 
 | 
|  |    636 | \begin{textblock}{6}(1,3)
 | 
|  |    637 |   \begin{bubble}[10.5cm]
 | 
|  |    638 |     Subject: \textbf{Re: Re: Re: Re: Hate '\textbf{\texttt{val}}'}\hfill 11:02 AM\bigskip\bigskip\\
 | 
|  |    639 |     
 | 
|  |    640 |     THANK YOU! You made me change my coding perspective. Because of you,
 | 
|  |    641 |     I figured out the next one\ldots
 | 
|  |    642 |   \end{bubble}
 | 
|  |    643 | \end{textblock}
 | 
|  |    644 | 
 | 
|  |    645 | \only<2>{
 | 
|  |    646 | \begin{textblock}{6}(0.3,11.8)
 | 
|  |    647 |   \begin{bubble}[3.1cm]
 | 
|  |    648 |     \textbf{Me:}
 | 
|  |    649 |     \raisebox{-12mm}{\includegraphics[scale=0.15]{../pics/happy.jpg}}
 | 
|  |    650 |   \end{bubble}
 | 
|  |    651 | \end{textblock}}
 | 
|  |    652 | 
 | 
|  |    653 | \end{frame}
 | 
|  |    654 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    655 | 
 | 
|  |    656 | 
 | 
|  |    657 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    658 | \begin{frame}[c]
 | 
| 33 |    659 | \frametitle{Conclusion}
 | 
|  |    660 | 
 | 
|  |    661 | \begin{itemize}
 | 
|  |    662 | \item Scala is still under heavy development\\ (the compiler is terribly slow)\medskip
 | 
|  |    663 | \item {\bf\url{http://www.scala-lang.org/}}\bigskip
 | 
| 140 |    664 |   
 | 
|  |    665 | \item it is a rather \textbf{\alert{deep}} language\ldots i.e.~gives
 | 
|  |    666 |   you a lot of rope to shoot yourself\bigskip
 | 
| 33 |    667 | 
 | 
| 140 |    668 | \item learning functional programming is not easy\ldots{}when you have
 | 
| 200 |    669 |   spent all of your career thinking in an imperative way, it is hard to
 | 
| 140 |    670 |   change\bigskip\medskip
 | 
|  |    671 |   
 | 
| 200 |    672 | \item hope you have fun with Scala and the assignments
 | 
| 33 |    673 | \end{itemize}
 | 
|  |    674 | \end{frame}
 | 
|  |    675 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    676 | 
 | 
|  |    677 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    678 | \begin{frame}[c]
 | 
| 140 |    679 | \frametitle{\begin{tabular}{c}\\[0cm]\alert{Questions?}\end{tabular}}
 | 
| 33 |    680 | 
 | 
| 140 |    681 | \begin{center}
 | 
|  |    682 |   \begin{tabular}[t]{@{}l@{}l@{}}
 | 
| 200 |    683 |     \includegraphics[scale=0.1]{../pics/mand4.png} & \hspace{4mm}
 | 
|  |    684 |     \raisebox{0mm}{\includegraphics[scale=0.1]{../pics/mand3.png}}      
 | 
| 140 |    685 |   \end{tabular}     
 | 
|  |    686 | \end{center}
 | 
|  |    687 | 
 | 
|  |    688 | \begin{center}
 | 
| 200 |    689 |   My Office Hours: Mondays 12 -- 14\\
 | 
|  |    690 |   except next week: Tuesday 12 -- 14
 | 
| 140 |    691 | \end{center}
 | 
| 33 |    692 | \end{frame}
 | 
|  |    693 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    694 | \end{document}
 | 
| 32 |    695 | 
 | 
|  |    696 | 
 | 
| 22 |    697 | \end{document}
 | 
|  |    698 | 
 | 
|  |    699 | %%% Local Variables:  
 | 
|  |    700 | %%% mode: latex
 | 
|  |    701 | %%% TeX-master: t
 | 
|  |    702 | %%% End: 
 | 
|  |    703 | 
 | 
| 140 |    704 | 
 | 
|  |    705 | “Functional programming is often regarded as the best-kept secret of
 | 
|  |    706 | scientific modelers, mathematicians, artificial intelligence
 | 
|  |    707 | researchers, financial institutions, graphic designers, CPU designers,
 | 
|  |    708 | compiler programmers, and telecommunications engineers.”
 | 
|  |    709 | 
 | 
|  |    710 | The Wikipedia F# page |