> Date: Tue, 01 Jun 1999 17:32:22 +0200
> From: Sven Panne <[EMAIL PROTECTED]>

> Don't fear! Mr. One-Liner comes to the rescue:    ;-)
> 
>    longerThan fn lenlim = readFile fn >>= lines .| filter (length .| (>lenlim)) .| 
>zip [1..] .| map (\(n,l) -> shows n ") " ++ l) .| unlines .| putStr

Are you sure he didn't want the _original_ line numbers?

   longerThan fn lenlim = readFile fn >>= lines .| zip [1..] .| filter (snd .| length 
.| (>lenlim)) .| map (\(n,l) -> shows n ") " ++ l) .| unlines .| putStr

Lars Mathiesen (U of Copenhagen CS Dep) <[EMAIL PROTECTED]> (Humour NOT marked)


Reply via email to