Better HN
topnewbestaskshowjobs
Log inSign up

glx4121_info

1 karma · joined Oct 16, 2013 (13y ago) · 1 submissions

Submissions

comment 13y ago · link · parent

IMHO this is a terrible example as you should never write this as it is just unix' sort. Furthermore I think it is even complicated. First, I think it should read from stdin and write to stdout and second this should be really short not what c++ people consider short.

E.g.

import Data.List

main = interact (unlines . sort . lines)