[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-beginners
Subject:    Re: [Haskell-beginners] Hint on exercise from Real World Haskell
From:       Daniel Fischer <daniel.is.fischer () web ! de>
Date:       2010-06-29 3:02:43
Message-ID: 201006290502.43333.daniel.is.fischer () web ! de
[Download RAW message or body]

On Tuesday 29 June 2010 04:45:23, Chris Saunders wrote:
> I have been working on the exercises from chapter 1 of Real World
> Haskell. I seem to be stuck on a solution to:
>
> 4.Modify the WC.hs example again, to print the number of characters in a
> file.
>
> I'm hoping to get a hint for this one.  I may request a solution later
> but for now I would prefer just a hint.

Have you done ex. 3: The words function counts the number of words in a 
string. Modify the WC.hs example to count the number of words in a file. ?

Originally, WC uses lines to break a String into a list of lines.
Then you use words to break a String into a list of words.
Now you want to make a list of characters out of the String.
How do you do that again?

>
> Regards
> Chris Saunders
>
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic