[Haskell-beginners] A first try
kutsurak at gmail.com
Fri Jun 24 15:22:25 CEST 2011
Thanks very much for your reply. I'll take a look at IterateIO and I
didn't know about hpaste.org, so i'll check it out as well.
On Fri, Jun 24, 2011 at 2:43 PM, David Place <d at vidplace.com> wrote:
> Hi, Panagiotis.
> The wc program is a good choice for a learning program, but it reveals a long-standing weakness in Haskell: Lazy-IO. I think you will find that your program will get an error if you try to run wc on many files. You will open too many files at once.
> There is a solution called IterateeIO. It's extremely elegant and very good Haskell, but quite challenging to understand. So far, I have not found a good tutorial.
> Luck for you the best example program is an implementation of wc!
> I posted it in hpaste.org. (A Haskell-specific version of pasteBin.)
> David Place
> Owner, Panpipes Ho! LLC
> d at vidplace.com
> On Jun 24, 2011, at 7:48 AM, Panagiotis Koutsourakis wrote:
>> Hello all,
>> I've been spending some time recently learning Haskell. I am not a
>> newbie in programming, and I've had some experience with lisp in the
>> past, but I have not really studied functional programming. I am
>> mostly seeking feedback regarding style, and glaring mistakes that I
>> may make in some toy examples, but I am not sure if this is the proper
>> place to ask.
>> In case it is though, here is an attempt (not yet complete) at the
>> word count program:
>> Thanks in advance!
>> Panagiotis Koutsourakis
>> Beginners mailing list
>> Beginners at haskell.org
More information about the Beginners