[Haskell-beginners] Re: monad nomad gonad gomad

Michael Mossey mpm at alumni.caltech.edu
Sun Aug 15 03:18:07 EDT 2010



prad wrote:

> part of the feeling i'm getting is that a function should only do one
> thing and i likely try to squeeze too much into it.

I don't think that's universally true, but you may need to stay simple 
while learning.

> 
> i'm used to using a lot of print statements to figure out errors, but
> may be the idea here is not to make errors because you're functions are
> written correctly and are precise.

Look at the Debug.Trace module. You can emit debugging messages in a 
non-safe but usually helpful manner. Be aware that the messages may come in 
an unexpected order due to laziness.

Mike



More information about the Beginners mailing list