SOE ex.9.12
* eta reduction
* sections
* anonymous functions
* function composition
It seems that I already apply some of these techniques on previous exercises.
Note:
The function composition is only apply to one parameter.
Something like this is not good:
f a b = 1 + (max a b)
f = (1+) . max -- try to eta reduction a, b
-- but function composition only allow one parameter.
(.) :: (a -> b) -> (c -> a) -> c -> b
Note: (2007-12-24)
The previous note is not correct, there is a way to write point free for (1 + max a b).
See the pointfree.