haskell-lectures/VL2/content/VL2_where.tex
Julian Ospald e9374aed1f
VL2: Restructure files, make the latex code more modular
Also added a few more section to make beamer and article more
compatible.
2015-04-20 18:06:58 +02:00

8 lines
162 B
TeX

We use \code{where} to define a helper function:
\begin{haskellcode}
f :: Int -> Int
f x = x + (y 2)
where
y :: Int -> Int
y p = x + p
\end{haskellcode}