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