[Haskell-cafe] Point-free style

Stephan Hohe sth.news at tejp.de
Tue Feb 15 13:27:28 EST 2005


Benjamin Franksen wrote:
> This one is a little bit shorter and somewhat more 'elementary':
> 
> s = (.) (flip (.) (head . uncurry zip . splitAt 1 . replicate 2) . uncurry) . 
> (flip (.) (flip (.)) . flip (.))

And with less flips:

s = (((. head . uncurry zip . splitAt 1 . repeat) . uncurry) .) . (.) . flip

/Stephan



More information about the Haskell-Cafe mailing list