haskell-lectures/VL2/content/VL2_define_functions3.tex

6 lines
155 B
TeX
Raw Normal View History

Another way which is very similar would be using \code{let}:
\begin{haskellcode}
f :: Int -> Int
f x = let y p = x + p
in x + (y 2)
\end{haskellcode}