Related topics

monad thinking process
These monads are present in ghc >= 4.06, in -package lang, modules: MonadReader MonadWriter MonadState MonadRWS The combination of state and output can be done as one of these: WriterT w (State s) StateT s (Writer w) RWS () ws where w is the type of output and must be a monoid (eg a list) and s is the type of

Some monad questions
TLOlczyk olczyk2...@yahoo.com comp lang scheme What is the Scheme equivalent of the Maybe monad ( note I am not looking for a monad, just a technique ). ( For those who are not familiar ) Since I am more familiar at this point in time with the SML construct I will review that. In ( instead of using SML constructs

State monads don't respect the monad laws in Haskell
Jonathan Cast jonathancc...@fastmail.fm fa haskell On 11 Feb 2008, at 5:33 AM, Deokjae Lee wrote: Tutorials about monad mention the "monad axioms" or "monad laws". The tutorial "All About Monads" says that "It is up to the programmer to ensure that any Monad instance he creates satisfies the monad laws".

What is a monad
I'm working towards a better understanding of Haskell monads the only way I know how: by working through an example. I am working on an AI agent that will perform a finite series of actions before starting the sequence over again. I figured a circular list of functions that shifts as you apply them would be the way

A question about "monad laws"
Simon Marlow simon...@microsoft.com fa haskell An interesting revelation just occurred to Simon PJ and myself while wondering about issues to do with exceptions in the IO monad (see discussion on glasgow-haskell-us...@haskell.org if you're interested). The question we were considering was whether the following

(continuation monad) type problem...
Marcin 'Qrczak' Kowalczyk qrc...@knm.org.pl comp lang functional On Sun, 28 Sep 2003 02:26:46 +0000, Brian McNamara! wrote: In that case, I don't see why it's signature is inEnv :: s -> ma -> ma instead of inEnv :: s -> m () The environment monad passes data to a computation but doesn't provide any mean to transfer

Ultimate No Minimum Bid Auction UD#6
Aaron Denney wno...@ofb.net fa haskell On 2008-02-14, Roman Leshchinskiy <r...@cse.unsw.edu.au> wrote: Richard A. O'Keefe wrote: Presumably the reason for having Int in the language at all is speed. As people have pointed out several times on this list to my knowledge, Integer performance is not as good as Int

Annihilator Ongoing Binary-EMP Report binspam.199902041936.003 @@NCM
Because FastCGI does the running of the passed in CGI action within a few calls to alloca :: (Ptr a -> IO b) -> IO b, I couldn't figure out a way to use monad transformers. I settled on the top-level IORef trick I've seen elsewhere: bigBallOfState_ :: IORef MyState bigBallOfState_ = unsafePerformIO $ newIORef

using the writer monad to better understand ...
Luke
Palmer lrpal...@gmail.com fa haskell 2008/2/12 Uwe Hollerbach <uhollerb...@gmail.com>: Well... I dunno. Looking at the source to GHC.Real, I see infinity, notANumber :: Rational infinity = 1 :% 0 notANumber = 0 :% 0 This is actually the reason I imported GHC.Real, because just plain % normalizes the rational

Is it an object? is it a monad? No! its ...
This is called a monad transfomer. The Haskell library source has for many monads both the "plain" monad and the transfomer, so you can just take a peek at the code if you're stuck. Here's the code for the continuation monad transformer: newtype ContT rma = ContT { runContT :: (a -> mr) -> mr } instance (Monad m)

stackhack attack
... <6dfpai$953$...@news.monad.net> alt.sex <6dfpat$953$...@news.monad.net> alt.sex <6dfpaf$953$...@news.monad.net> alt.sex <6dfpae$953$...@news.monad.net> alt.sex <6dfpb2$953$...@news.monad.net> alt.sex.bestiality <6dfpba$953$836@news. monad.net> alt.sex.bestiality <6dfpbb$953$...@news.monad.net> alt.sex.bestiality

Yet Another Monad Tutorial
If it is mathematical identity, a programmer need not care about this law to implement a monad. Can anyone give me an example implementation of monad that violate this law ? After three or five reactions to this posting, I think it it is time to generalize. Haskell is not math. Or rather, there is no way to be sure

Monad in Haskell - whats wrong with this ?
B4B37...@worldnet.net> alt.sex.fetish alt.sex.fetish.amputee alt.sex.fetish.barbie alt.sex.fetish.boyfeet alt.sex.fetish.drew-barrymore alt.sex.fetish.drmellow alt.sex.fetish.fa alt.sex.fetish.fashion alt.sex.fetish.feet.toes.opps alt.sex.fetish.feet <6dfn6f$7b8$...@news.monad.net> alt.sex.fetish.fa

using the writer monad to better understand foldl ...
mayayana mayayanaX...@mindXXspring.com microsoft public scripting vbscript microsoft public scripting wsh microsoft public windows server scripting Of course, command line is great as one option, but that doesn't appear to be the plan with Monad. I may be missing something with Monad (I've just started reading the

list of results monad
Wilhelm B. Kloke w...@arb-phys.uni-dortmund.de fa haskell a...@spamcop.net <ajb@spamcop. net> schrieb: G'day all. Richard A. O'Keefe wrote: Hmm. Personally, I've never seen an algorithm where comparing for exact equality was algorithmically necessary. One trick I've occasionally used is to avoid the need for a

Spam NoCeM report spam.199803030030.01 @@NCM
... fa haskell Hi (x >>= f) >>= g == x >>= (\v -> fv >>= g) Or stated another way: (x >>= f) >>= g == x >>= (f >>= g) Which is totally wrong, woops. See this page for lots of details about the Monad Laws and quite a nice explanation of where you use them: http://www.haskell.org/haskellwiki/Monad_Laws Thanks Neil

State Monad operators accross different monads
I will give two examples of a failure to make distinctions between objects and monads, one taken from cosmology and one from biology (1 and 2 below), but first a brief overview. A monad is an idea I took from Liebniz. As far as I know, there is no modern equivalent term. A monad is a self-referencing entity which,

EMP/ECP cancelled (Easy Money!!: "Sam Boyd" <sboyd@cyberportal.net ...
Bill Taylor w.tay...@math.canterbury.ac.nz sci logic And what the heck is a "monad"? http://en.wikipedia.org/wiki/Monad That's no help at all! The article pretty much assumes that one already knows essentially what they are. Please tell us what a monad is, in simple language, without using other technical terms,

Monad laws
Ben Franksen ben.frank...@online.de fa haskell Dan Piponi wrote: IOn Feb 11, 2008 9:46 AM, Miguel Mitrofanov <miguelim...@yandex.ru> wrote: It's well known that "ListT m" monad violates this law in general (though it satisfies it for some particular monads m). For example, I went through this example in quite a bit

Monad: Why I think it needs a pick-property cmdlet
In the section "No Way Out": ---------- The IO monad is a familiar example of a one-way monad in Haskell. Because you can't escape from the IO monad, it is impossible to write a function that does a computation in the IO monad but returns a non-monadic value. Not only are functions of the type IO a -> a impossible