[Haskell-cafe] Monad explanation
ok at cs.otago.ac.nz
Wed Feb 4 21:18:09 EST 2009
On 5 Feb 2009, at 10:20 am, Gregg Reynolds wrote:
> That's a fairly common representation, seems to work for lots of
> people, but it caused me no end of trouble. Values are mathematical
> objects; how, I asked myself, can they possibly /be/ programs that
> do IO (or actions, or computations, or <your metaphor here>)? It
> doesn't make sense, says I,
without reference to the rest of your message, of course values can /be/
programs. One of the fundamental insights in programming is that
(all) programs are values, which, in combination with the observation
that some programs exist, means that some values are programs.
Indeed, in the pure lambda calculus, _everything_ is a function (=
If you don't like it put that way, say that values can be _names for_
programs, or that values can _be treated as_ programs by interpreters.
I'd rather not get too far into White Knight territory, though.
More information about the Haskell-Cafe