[Haskell-cafe] Re: Monad explanation

2009-02-09 Thread Emilio Jesús Gallego Arias
Gregg Reynolds d...@mobileink.com writes: But it can't be a function, since it is non-deterministic. IMHO, if you assume IO a = World - (World, a), then getChar is indeed a function and deterministic. It is, there are not w :: World such that getChar w != getChar. The fact that World is too

[Haskell-cafe] Re: Monad explanation

2009-02-09 Thread Emilio Jesús Gallego Arias
egall...@babel.ls.fi.upm.es (Emilio Jesús Gallego Arias) writes: IMHO, if you assume IO a = World - (World, a), then getChar is indeed a function and deterministic. It is, there are not w :: World such that getChar w != getChar. Sorry I meant: There is not w :: World such that getChar w !=

[Haskell-cafe] Re: Monad explanation

2009-02-05 Thread Benjamin L . Russell
On Wed, 4 Feb 2009 21:43:04 -0800, Max Rabkin max.rab...@gmail.com wrote: On Wed, Feb 4, 2009 at 9:38 PM, Benjamin L. Russell dekudekup...@yahoo.com wrote: Is it possible to write a self-referential function in Haskell that modifies itself? Is it possible to write *any* kind of function in

Re: [Haskell-cafe] Re: Monad explanation

2009-02-05 Thread Daryoush Mehrtash
Can someone compare/contrast functions and computation? thanks daryoush On Thu, Feb 5, 2009 at 1:38 AM, Benjamin L. Russell dekudekup...@yahoo.comwrote: On Wed, 4 Feb 2009 21:43:04 -0800, Max Rabkin max.rab...@gmail.com wrote: On Wed, Feb 4, 2009 at 9:38 PM, Benjamin L. Russell

[Haskell-cafe] Re: Monad explanation

2009-02-05 Thread ChrisK
All Haskell programs start as main :: IO () though... so they all get evaluated in the context of another IO () don't they? True for most cases now, but historically false. Haskell existed and people wrote programs for years before the Monad class and IO were created. A Haskell98

[Haskell-cafe] Re: Monad explanation

2009-02-04 Thread Benjamin L . Russell
On Thu, 5 Feb 2009 15:18:09 +1300, Richard O'Keefe o...@cs.otago.ac.nz wrote: 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

Re: [Haskell-cafe] Re: Monad explanation

2009-02-04 Thread Max Rabkin
On Wed, Feb 4, 2009 at 9:38 PM, Benjamin L. Russell dekudekup...@yahoo.com wrote: Is it possible to write a self-referential function in Haskell that modifies itself? Is it possible to write *any* kind of function in Haskell that modifies *anything*? --Max