Ooops - more bugs in my explanation...
Brian Hulley wrote:
-- from State.hs
newtype State s a = S (s -> (a,s))
I used the source given in ghc-6.4.2\libraries\monads\Monad\State.hs but the
version of state monad that comes with the hierarchical libs is in
ghc-6.4.2\libraries\mtl\Control\
Kaveh Shahbazian wrote:
Very Thankyou
I am starting to feel it. I think about it as a 'context' that wraps
some computations, which are handled by compiler environment (please
make me correct if I am wrong). Now I think I need to find out how
this 'monads' fit in solving problems. And for that I
Very Thankyou
I am starting to feel it. I think about it as a 'context' that wraps
some computations, which are handled by compiler environment (please
make me correct if I am wrong). Now I think I need to find out how
this 'monads' fit in solving problems. And for that I must go through
bigger pr
Brian Hulley wrote:
q >>= (\x -> p)
For example with the State monad, (q) must be some expression which
evaluates to something of the form S fq where fq is a function with
type s -> (a,s), and similarly, (\x -> p) must have type a ->S ( s ->
(a,s)). If we choose names for these values which de
Kaveh Shahbazian wrote:
Thanks All
This is about my tries to understand monads and handling state - as
you perfectly know - is one of them. I have understood a little about
monads but that knowledge does not satidfy me. Again Thankyou
There are many tutorials available from the wiki at
http://w
Thanks All
This is about my tries to understand monads and handling state - as
you perfectly know - is one of them. I have understood a little about
monads but that knowledge does not satidfy me. Again Thankyou
On 8/2/06, Duncan Coutts <[EMAIL PROTECTED]> wrote:
On Wed, 2006-08-02 at 13:26 +0330
Thanks All
This is about my tries to understand monads and handling state - as
you perfectly know - is one of them. I have understood a little about
monads but that knowledge does not satidfy me. Again Thankyou
On 8/2/06, Donn Cave <[EMAIL PROTECTED]> wrote:
On Wed, 2 Aug 2006, Donald Bruce Stew
On Wed, 2006-08-02 at 13:26 +0330, Kaveh Shahbazian wrote:
> Haskell is the most powerfull and interesting "thing" I'v ever
> encountered in IT world. But with an imparative background and lack of
> understanding (because of any thing include that maybe I am not that
> smart) has brought me problem
On Wed, 2 Aug 2006, Donald Bruce Stewart wrote:
...
> Of course, if you're learning Haskell, you should probably try to
> /avoid/ mutable variables for a while.
Along the same line, I note that proposed solutions seem to use
features relatively recently added to the language, is that true?
StateT
Hello Kaveh,
Wednesday, August 2, 2006, 1:56:10 PM, you wrote:
> Question : Could anyone show me a sample of using a monad as a
> statefull variable?
monad is not an "stateful variable", it's the way to organize
computations, rule to join them (as the Ring of Supreme Power ;) ).
i recommend you
Am Mittwoch, 2. August 2006 11:56 schrieb Kaveh Shahbazian:
> Haskell is the most powerfull and interesting "thing" I'v ever
> encountered in IT world. But with an imparative background and lack of
> understanding (because of any thing include that maybe I am not that
> smart) has brought me proble
kaveh.shahbazian:
> Monad Imparative Usage Example
>
> Thanks for your replies. I have not haskell on this computer and I
> will try this solutions tonight.
> I must notice that IO computations is not the point here. My target is
> to have this code for mutable variable 'var'.
Still not entirely
Kaveh Shahbazian wrote:
Haskell is the most powerfull and interesting "thing" I'v ever
encountered in IT world. But with an imparative background and lack of
understanding (because of any thing include that maybe I am not that
smart) has brought me problems. I know this is an old issue. But
pleas
Monad Imparative Usage Example
Thanks for your replies. I have not haskell on this computer and I
will try this solutions tonight.
I must notice that IO computations is not the point here. My target is
to have this code for mutable variable 'var'.
On 8/2/06, Kaveh Shahbazian <[EMAIL PROTECTED]> wrote:
Haskell is the most powerfull and interesting "thing" I'v ever
encountered in IT world. But with an imparative background and lack of
understanding (because of any thing include that maybe I am not that
smart) has brought me problems. I know
kaveh.shahbazian:
> Haskell is the most powerfull and interesting "thing" I'v ever
> encountered in IT world. But with an imparative background and lack of
> understanding (because of any thing include that maybe I am not that
> smart) has brought me problems. I know this is an old issue. But
> ple
Haskell is the most powerfull and interesting "thing" I'v ever
encountered in IT world. But with an imparative background and lack of
understanding (because of any thing include that maybe I am not that
smart) has brought me problems. I know this is an old issue. But
please help it.
Question : Cou
17 matches
Mail list logo