haskell-lectures/VL2/content/VL2_where.tex

8 lines
233 B
TeX

\ifger{Wir benutzen}{We use} \hinline{where} \ifger{um eine Hilfsfunktion zu definieren:}{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}