Bulat Ziganshin wrote:

Hello Stefan,

Sunday, August 14, 2005, 2:05:00 PM, you wrote:

SH>  let format line = "[" ++ concat (intersperse "," (words line)) ++ "]"
SH>  return $ map (mkVec . read . format)  $ lines str -- CORRECTED

or just

return $ map (mkVec . map read . words)  $ lines str

Hi Bulat and Stefan -
 Thanks very much for your help - very much appreciated!
In spite of being a newcomer, I'm very much sold on Haskell's elegance and clean syntax.

On the subject of whether this is a good way to learn Haskell - granted, it's probably not ideal.

However, I've already been through the GHC user guide (and also visited the "PLEAC" site on Sourceforge). I didn't find quite the code that I was looking for in either place, so I scanned the archives of this list as well (where I found the previously-posted code). So that's three places ...

If there were a "Haskell cookbook" (as there is a Python one), I would have gone straight there. I regularly use the "Python cookbook" site which is very useful . However, until there's a Haskell equivalent (which then newcomers could be pointed at) , it's pretty much a case of "finding what one can" ... :-) Many thanks again - I'll make this my last post for at least a week or two (to give others some bandwidth) -
- Andy










_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to