Improve function composition slides

这个提交包含在:
Julian Ospald 2015-04-19 17:54:25 +02:00
父节点 db59997841
当前提交 ca0f732f08
找不到此签名对应的密钥
GPG 密钥 ID: 220CD1C5BDEED020
共有 1 个文件被更改,包括 9 次插入0 次删除

查看文件

@ -366,6 +366,15 @@ Solution:
(.) :: (b -> c) -> (a -> b) -> a -> c
(.) f g x = f (g x)
\end{haskellcode}
\pause
And now you can chain functions together. Not just two! Look:
\begin{haskellcode}
f :: String -> Bool
f xs = (even . length . (\x -> x ++ "Hello world")) xs
-- or less ugly
f xs = even . length . (\x -> x ++ "Hello world") $ xs
\end{haskellcode}
% $
\end{frame}
\section{6. Recursion patterns}