From: "Axel Poigné" <axel.poigne@iais.fraunhofer.de>
To: caml-list caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Disappointment
Date: Tue, 22 Jul 2008 15:27:35 +0200 [thread overview]
Message-ID: <5D9CA6BE-731F-45A7-A1CC-AF1DC0556314@iais.fraunhofer.de> (raw)
In-Reply-To: <4885BCC5.6080802@soton.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]
> Computer scientists like to obfuscate dead simple ideas with
> complicated
> looking mathematics to deter commonsense-oriented people from making
> embarassing observations, such as that computer science was
> unable to see something that actually is pretty much obvious -
> for ages... ;-)
Maybe computer scientists obfuscate. The mathematical concept of
monads however is dead simple (at least if interpreted in a world of
sets):
Let X be a set of values and let TX denote a set of "simple terms"
over these values. A "simple term" may be thought of as either "an
operator applied to a tuple of values" or "a value", e.g. "values" are
1,2,3,... and "simple terms" are 3, +(3,5), ...
Additionally to the "operator" T on sets there are two functions:
- \eta: X -> TX that turns a value into a "simple term", e.g.
\eta(3) = 3
- \mu: TX -> X that computes the value of a "simple term", hence
defines the semantics, e.g. \mu(+(3,5)) = 8.
(T, \eta, and \mu) form a monad if
- a term that is a value is evaluated to the respective value (which
is an axiom missing in Haskell if I understood a previous message
correctly)
- if we build "complex terms", i.e. iterate the operator T, it does
not matter in which order one evaluates.
I agree that it gets slightly more involved if one specifies the
second axiom formally.
Don't know whether this helps to understand monads in programming
since so far I did not care very much about them. However that's were
Eugenio Moggi took the idea from when introducing monads to semantics.
Axel
[-- Attachment #2: Type: text/html, Size: 5166 bytes --]
next prev parent reply other threads:[~2008-07-22 13:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-21 21:28 Disappointment Paolo Donadeo
2008-07-21 21:42 ` [Caml-list] Disappointment Till Crueger
2008-07-22 3:41 ` Fabrice Marchant
2008-07-22 6:50 ` Gabriel Kerneis
2008-07-22 10:56 ` Dr. Thomas Fischbacher
2008-07-22 13:27 ` Axel Poigné [this message]
2008-07-22 15:17 ` Andrej Bauer
2008-07-22 15:21 ` Axel Poigné
2008-07-22 12:57 ` Nicolas Pouillard
2008-07-22 13:16 ` Dario Teixeira
2008-07-22 16:11 ` Christophe TROESTLER
2008-07-22 21:55 ` Paolo Donadeo
2008-07-22 16:10 ` Warren Harris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5D9CA6BE-731F-45A7-A1CC-AF1DC0556314@iais.fraunhofer.de \
--to=axel.poigne@iais.fraunhofer.de \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox