Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, that works for really short methods, but for anything even a little more complex you're just replacing vertical scrolling with horizontal scrolling.


That's true for one-liners in any language.


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)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: