
10 Apr
2012
10 Apr
'12
8:03 a.m.
Tillmann Rendel
I am curious what are interesting use-cases for that? Symbolic analysis? self-compilers?
Optimization. For example, imagine the following definition of function composition:
map f . map g = map (f . g) f . g = \x -> f (g x)
In Haskell, we cannot write this, because we cannot pattern match on function calls.
Static optimizations like this one can be done, when you have an abstraction layer above the actual functions. In fact you can even write efficient statically and dynamically self-organizing networks of functions, as long as there is an algebraic type to support it. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/