
Thanks guys. Finally got there and I’m sorry, I should have put more detail in the original question. movesParser :: Parser Moves movesParser = do move <- moveParser char ';' moves <- many moveParser return $ Moves ([move] ++ moves) main = do let mvsIo = readFile “moves.txt” — IO String mvs <- mvsIo — String let m = parse movesParser "Parsing Moves" mvs return m I must say that the people on this list are very helpful and polite. Also Haskell is a challenge but so rewarding. It’s become the ‘itch I have to scratch’. Thanks
On 17 May 2015, at 00:13, Henk-Jan van Tuyl
wrote: On Sat, 16 May 2015 23:18:04 +0200, Dennis J. McWherter, Jr.
wrote: :
processedLines <- return (fmap moveParser $ lines contents) :
Or, a bit simpler: let processedLines = fmap moveParser $ lines contents
Regards, Henk-Jan van Tuyl
-- Folding@home What if you could share your unused computer power to help find a cure? In just 5 minutes you can join the world's biggest networked computer and get us closer sooner. Watch the video. http://folding.stanford.edu/
http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html Haskell programming --