12 lines
350 B
TeX
12 lines
350 B
TeX
|
We can also have \textbf{anonymous functions} which just means the function doesn't have a name:
|
||
|
\begin{haskellcode}
|
||
|
f :: Int -> Int
|
||
|
f x = (\y -> y + 1) x
|
||
|
\end{haskellcode}
|
||
|
\pause
|
||
|
Although this is basically the same as:
|
||
|
\begin{haskellcode}
|
||
|
f :: Int -> Int
|
||
|
f x = x + 1
|
||
|
\end{haskellcode}
|
||
|
Anonymous functions will come extremely handy later, you'll see.
|