[Haskell-cafe] A handy little consequence of the Cont monad

Don Stewart dons at galois.com
Fri Feb 1 17:51:34 EST 2008

> On Fri, 2008-02-01 at 16:48 -0500, Dan Licata wrote:
> > Not to start a flame war or religious debate, but I don't think that
> > eta-expansions should be considered bad style.  I realize that
> > composition-style is good for certain types of reasoning, but fully
> > eta-expanded code has an important legibility advantage: you can tell
> > the shape of its type just by looking at it!  Personally, I'd rather
> > read the original version.
> Clearly you don't hang out on #haskell enough and have missed the humor.

For those not following, the last thing one does before comitting
any Haskell code, once you've been on #haskell, is to feed it 
to lambdabot for "improvement"  :)

     dons> @pl \f g (a,b) -> (f a, g b)
     lambdabot> flip flip snd . (ap .) . flip flip fst . ((.) .) . flip . (((.) .  (,)) .)

Ah, much better.

We have a strange culture.

-- Don

More information about the Haskell-Cafe mailing list