[Haskell-cafe] Code Golf

Martijn van Steenbergen martijn at van.steenbergen.nl
Thu Apr 16 03:20:41 EDT 2009


Matt Morrow wrote:
> And i forgot to include the defs of (co)prod:
> 
> coprod (<>) i1 i2 = (\a b -> i1 a <> i2 b)

lambdabot> pl \f i1 i2 -> (\a b -> i1 a `f` i2 b)
(flip .) . (((.) .) .) . (.)

Muhahaha. :-D Too bad the flip is still in there. :-)

Martijn.



More information about the Haskell-Cafe mailing list