in reply to Golf: Length of longest line in a file
Meh, everyone's beat mine.
#!/usr/bin/runhaskell import IO main=do t<-(hGetContents stdin);putStrLn$show$foldl max 0$map length$l +ines t
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Golf: Length of longest line in a file
by mellon85 (Monk) on Jul 04, 2010 at 08:15 UTC | |
|
Re^2: Golf: Length of longest line in a file
by ambrus (Abbot) on Jul 04, 2010 at 10:44 UTC |