[Haskell-cafe] Pointfree composition for higher arity

Henning Thielemann lemming at henning-thielemann.de
Mon Feb 22 13:28:46 EST 2010


On Wed, 17 Feb 2010, Neil Brown wrote:

> I very often write this too (wanting function composition, but with a 
> two-argument function on the right hand side).  The trick I picked up from 
> somewhere is to do:
>
> fun = (runFun .) . someFun someDefault
>
> I'm not too keen on that, as it seems clumsy.  I often end up writing the 
> operator that you describe, but have never settled on a consistent name 
> (since the obvious one to me, (..), is taken).

Maybe helpful:
  http://www.haskell.org/haskellwiki/Composing_functions_with_multiple_values



More information about the Haskell-Cafe mailing list