Thanks for all the help. The simplified example indeed threw away too
much. There were no side effects.
Brent, of course I couldn't create your function; though I gained
through trying. I then found it useful to consider the type of:
fmap (\x -> putStrLn x) getLine
which is IO (IO ()) and hence
On Sat, May 02, 2009 at 05:31:03PM +0100, Paul Keir wrote:
> An example immediately follows that quotation on the wiki:
>
> do text <- getLine
>if null text
> then putStrLn "You refuse to enter something?"
> else putStrLn ("You entered " ++ text)
Then, how about
getMyLine = getL
On Sat, May 02, 2009 at 05:31:03PM +0100, Paul Keir wrote:
> On the wiki page for Applicative Functors
> (http://www.haskell.org/haskellwiki/Applicative_functor) a familiar
> characteristic of monads is quoted; that they "allow you to run actions
> depending on the outcomes of earlier actions".
On Sat, May 2, 2009 at 11:31 AM, Paul Keir wrote:
> On the wiki page for Applicative Functors
> (http://www.haskell.org/haskellwiki/Applicative_functor) a familiar
> characteristic of monads is quoted; that they "allow you to run actions
> depending on the outcomes of earlier actions". I feel comf
On the wiki page for Applicative Functors
(http://www.haskell.org/haskellwiki/Applicative_functor) a familiar
characteristic of monads is quoted; that they "allow you to run actions
depending on the outcomes of earlier actions". I feel comfortable with Functors
and Applicative Functors, but I d