You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- But let's not stop here. What does the dot \code{(.)} actually mean?
- \vspace{\baselineskip}
- \\
- \pause
- It's just a function (the \emph{prefix} version of \code{.})! Here is the type signature:
- \begin{haskellcode}
- (.) :: (b -> c) -> (a -> b) -> a -> c
- \end{haskellcode}
- \pause
- \textbf{Exercise:} Implement it! It's really just one line! Remember the mathematical definition.
- \vspace{\baselineskip}
- \\
- \pause
- Solution:
- \begin{haskellcode}
- (.) :: (b -> c) -> (a -> b) -> a -> c
- (.) f g x = f (g x)
- \end{haskellcode}
|