[Haskell-beginners] computation vs function

Daniel Fischer daniel.is.fischer at web.de
Wed Apr 22 17:54:44 EDT 2009

Am Mittwoch 22 April 2009 23:06:02 schrieb Daniel Carrera:

> The Wikipedia article seems to use "monadic type" for the same things
> that ertes calls "computation".
> I can't decide which term gives better intuition. The term "computation"
> makes binding more intuitive: The computation (m a) returns a value of
> type "a" can then be fed into a function of type (a -> m b). On the
> other hand, "monadic type" is more intuitive when you write "Maybe Int"
> or "IO String".

Yes, different expressions give better pictures for different aspects.
I think the term computation is meant to hint that the computations in one monad share a 
common structure, much more so than general functions, so a different term was chosen.
Of course computations in different monads have different structures, but even these have 
common aspects (which are then captured in the Monad type class).

> Anyways, thanks for the help. I'm (slowly) making progress.
> Cheers,
> Daniel.


More information about the Beginners mailing list