2006-11-02
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
|