[Haskell-beginners] Re: monad nomad gonad gomad
Michael Mossey
mpm at alumni.caltech.edu
Tue Aug 17 16:34:01 EDT 2010
prad wrote:
> On Sun, 15 Aug 2010 21:11:52 +0200
> however, i also have:
>
> ========
> subs (l:ls)
> | ls==[] = l : []
> | otherwise =
> case l of
> "```" -> do
> let (code:z) = ls
> str = gt code -- works
> --str <- readFile "B" -- doesn't work
> subs (str:z)
> _ -> l : subs ls
>
>
> gt s =
> case s of
> "B" -> "BBBB"
> "C" -> "CCCC"
> ========
Can I make a general suggestion? It looks to me like you need to work
through a book like "Real World Haskell" sequentially from the beginning.
It looks like you are trying to do complex things before you've mastered
simple things.
Mike
More information about the Beginners
mailing list