
20 Feb
2010
20 Feb
'10
8:41 p.m.
Matt Hellige wrote:
Thanks! I'm glad to know that people have found this approach useful. In cases where it works, I find it somewhat cleaner than families of combinators with (what I find to be) rather obscure names, or much worse, impenetrable sections of (.). We can write the original example in this style: fun = someFun someDefault $:: id ~> id ~> runFun but unfortunately, while it's both pointfree and fairly clear, it isn't really an improvement over the pointful version, IMHO.
For something this simple it's not too helpful. But, one of the places it really shines is when dealing with newtypes in order to clean up the wrapping/unwrapping so they don't obscure the code. -- Live well, ~wren