Ugliest code

Associate
Joined
19 Oct 2002
Posts
550
Location
Penryn
Looking through some old code written I think I've discovered the least intelligible, and ugliest line of code I've ever written.

> let selfPostersTable = table << [ tr << [ format_row (length [(x, 1) | Just x <- map (\ x -> (selfPost (eqPair x)x) ) ( zip map (\ x -> (lookup x from)) [ x | (x,y) <- [(a, b) | (a, Just b) <- [ (i, last $ [Nothing] ++ map(ref_to_index tables) (words r) ) | (i, r) <- rs]]] map (\ x -> (lookup x from)) [ x | (x,y) <- [(a, b) | (a, Just b) <- [ (i, last $ [Nothing] ++ map(ref_to_index tables) (words r) ) | (i, r) <- rs]]] map (\ y -> (lookup y from)) [ y | (x,y) <- [(a, b) | (a, Just b) <- [ (i, last $ [Nothing] ++ map(ref_to_index tables) (words r) ) | (i, r) <- rs]]])]) u f] | (u,f) <- sortBy compare $ fmToList $addListToFM_C (\old new -> old + new) emptyFM [(x, 1) | Just x <- map (\ x -> (selfPost (eqPair x)x) ) ( zip map (\ x -> (lookup x from)) [ x | (x,y) <- [(a, b) | (a, Just b) <- [ (i, last $ [Nothing] ++ map(ref_to_index tables) (words r) ) | (i, r) <- rs]]] map (\ x -> (lookup x from)) [ x | (x,y) <- [(a, b) | (a, Just b) <- [ (i, last $ [Nothing] ++ map(ref_to_index tables) (words r) ) | (i, r) <- rs]]] map (\ y -> (lookup y from)) [ y | (x,y) <- [(a, b) | (a, Just b) <- [ (i, last $ [Nothing] ++ map(ref_to_index tables) (words r) ) | (i, r) <- rs]]])] ]

It's in Haskell and was part of a newsgroup analysis assignment.

Wondering what other beauties folk have created.
 
Back
Top Bottom