[Haskell-cafe] Toy application advice wanted

Lyle Kopnicky kopnicky at cse.ogi.edu
Wed May 5 10:53:31 EDT 2004

David Roundy wrote:

>I think that sounds like a good idea (not doing a GUI just yet) but would
>recommend that perhaps you could do something pretty impure in terms of
>file or directory browsing.  That wouldn't involve going beyond the
>standard libraries, but might give you some idea of the expressive power of
>the languages in terms of IO actions.  I'm thinking something like a
>recursive grep, or wc -l... except preferably a bit more tailored to the
>sort of IO you'll have to do in your actual application.  I guess the trick
>would be in finding something tough enough, since wc -l would be something
>like a two-liner...
A one-liner:

main = interact (show . length . lines)

- Lyle Kopnicky

More information about the Haskell-Cafe mailing list