News for hackers. Stuff that matters.
Re:C-style vs. Python-style syntax: which one would you pref... by FalconNL on Monday December 15, 2008 @02:18AM (#398136)
Not necessarily. In Haskell the oneliners are frequently short enough to fit on one screen.

For example, I recently needed to do some Run-Length Encoding:

    import Control.Arrow
    import Data.List
    
    encodeRLE :: (Eq a) => [a] -> [(Int, a)]
    encodeRLE = map (length &&& head) . group
    
    decodeRLE :: [(Int, a)] -> [a]
    decodeRLE = concatMap (uncurry replicate)

There are no comments on this comment yet.