[Haskell-beginners] Basic experimenting with monads

Conrad Meyer konrad at tylerc.org
Wed Mar 4 18:58:18 EST 2009

On Wednesday 04 March 2009 02:45:00 pm Patrick LeBoutillier wrote:
> My understanding is that what is really "passed" to the skip function
> is something like this:
> putStrLn "2" >> putStrLn "3"
> Here is my question: is it possible for the skip function to return
> the number of actions that were skipped? In other words, is it
> possible to go through the chain above without executing the actions
> but counting them instead?

I am also a beginner (so I am probably wrong), but I think actually the (>>) 
function turns two IO actions into one, and your function only recieves that 
one IO action. I am not sure if that can be decomposed or not (probably not).

Conrad Meyer <konrad at tylerc.org>

More information about the Beginners mailing list