Haskell Hacking: a journal of Haskell programming

Haskell Hacking has moved => Go here.
2006-11-02

@pl-ising Stefan Holdermans' Code

Stefan made a little joke about how sometimes Haskell code can be non-obvious. Although his code seems pretty tame, I wondered what it would look like @pl-ified by lambdabot. The results were surprisingly good:
import Control.Arrow
import Data.List

order = map snd
      . sortBy ((. fst)
      . compare . fst)
      . zipWith ((id ***) . flip (,)) [toEnum 0..]
      . sortBy ((. snd) . compare . snd)
      . zip [0..]
Looks about the same, right? Yes! I thought lambdabot would explode this, and it didn't :) The end.

/home :: /haskell :: permalink :: rss

About

Real World Haskell

RWH Book Cover

Archives

Recommended

Blog Roll

Syndicate