Hannah Schroeter wrote:
> [...] So, still no need to fuzz with file handles :-)

... and no need to fuzz with intermediate names, either. :-) If you
define an operator for reversed function composition

   (.|) = flip (.)

and read it like a pipe in *nix, you get a one-liner:

   longerThan fn lenlim = readFile fn >>= lines .| filter (length .| (>lenlim)) .| 
unlines .| putStr

Whether this is more or less readable than Hannah's version is largely
a matter of personal taste.

Cheers,
   Sven
-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:[EMAIL PROTECTED]            D-80538 Muenchen
http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne


Reply via email to