Just for your fun and horror

Andreas Gruenbacher gruenbacher-lists@geoinfo.tuwien.ac.at
Fri, 16 Feb 2001 15:57:34 +0100 (CET)

On Fri, 16 Feb 2001, Jerzy Karczmarczuk wrote:

> [..]
> fm _ z [] = return z
> fm g z (a:aq) = g z a >>= \y->fm g y aq
> When I started correcting the exam, I thought I would jump
> out of the window. First 30 copies: The type of fm is
> ff -> b -> [c] -> b
> (with an appropriate constraint for the functional type ff).
> The result had for them the same type as the type of z.
> My inquiry proved beyond any doubt that my students are so
> conditioned by "C", that despite the fact that we worked with
> monads for several weeks, they *cannot imagine* that
> "return z"
> may mean something different than the value of "z".
> Any suggestions?

Not that it would help you much, but I also think that return is a rather
confusing name for what might otherwise be called liftM0.


 Andreas Gruenbacher                  gruenbacher@geoinfo.tuwien.ac.at
 Research Assistant                       Phone      +43(1)58801-12723
 Institute for Geoinformation             Fax        +43(1)58801-12799
 Technical University of Vienna           Cell phone   +43(664)4064789