Jeff Dalton <[EMAIL PROTECTED]> wrote:

> Sure, cat in itself isn't very interesting.  But cat is just a simple
> case of a more interesting problem, that of writing what Unix calls
> "filters": programs that take some input from a file or pipe or other
> similar source and transform it into some output.

Yes, but cat *doesn't* transform anything. The problem is not that cat is a
filter, but that it is such a trivial one.

I would think that if one wishes to learn functional programming, one would
be best advised to start out solving problems that are well-suited to the
functional paradigm -- where most of the solution involves manipulating the
data in memory, rather than getting the data in or out of the program. The
simplest Unix filters, such as cat and tee, don't fit this description. More
complex filters such as grep (or even wc) would make much better learning
projects.

Craig




Reply via email to