Sven Panne wrote: > > Friedrich Dominicus wrote: > >[...] How can I combine the output with a line-number can I put that > > into the filter? Or do I have to found another solution? > > 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 Do you want to drive me away from learning Haskell? Who the hell can try to write such functions? Is readabilty not a concern in Haskell? > > [ This mail is optimised for 1280x1024 in landscape mode... ] yes and with one completly diffent mindscape ;-) Regards Friedrich
- Re: how to write a simple cat David Overton
- Re: how to write a simple cat Keith Wansbrough
- Re: how to write a simple cat Friedrich Dominicus
- Re: how to write a simple cat Hannah Schroeter
- Re: how to write a simple cat Friedrich Dominicus
- Re: how to write a simple cat Hannah Schroeter
- Re: how to write a simple cat Sven Panne
- Re: how to write a simple cat Friedrich Dominicus
- Re: how to write a simple cat S. Alexander Jacobson
- Re: how to write a simple cat Sven Panne
- Re: how to write a simple cat Friedrich Dominicus
- Re: how to write a simple cat Jan Skibinski
- Re: how to write a simple cat Lars Henrik Mathiesen
- Re: how to write a simple cat Keith Wansbrough
- Re: how to write a simple cat Lennart Augustsson
- Re: how to write a simple cat Kevin Atkinson
- RE: how to write a simple cat Frank A. Christoph
- Re: how to write a simple cat Friedrich Dominicus
- RE: how to write a simple cat Simon Peyton-Jones
- RE: how to write a simple cat trb
- RE: how to write a simple cat Hans Aberg