Monads [beginner]

2002-12-12 Thread maas
What are Monads? Where can I read about then? I read that there´s some mathematical foundation under this concept, where can read about these theories? +-+ | Marcos Aurélio Almeida da Silva | | E-mail: [EMAIL PROTECTED]| +-+

Re: Monads [beginner]

2002-12-12 Thread Benderjgdefault
In a message dated 12/12/2002 2:45:31 PM Eastern Standard Time, [EMAIL PROTECTED] writes: > What are Monads? > Where can I read about then? > > I read that there´s some mathematical foundation under this > concept, where > can read about these theories? A large set of articles on monads in the

Re: Monads [beginner]

2002-12-12 Thread Joel Wright
I've found this page a very helpful introduction to Monads and monadic programming. http://www.dcs.gla.ac.uk/~nww/Monad.html Have fun, Joel. On Thu, 2002-12-12 at 19:45, [EMAIL PROTECTED] wrote: > What are Monads? > Where can I read about then? > > I read that theres some mathematical foundatio

Re: Monads [beginner]

2002-12-13 Thread Keith Wansbrough
Hi Joel and Jim - thanks for your useful responses to Marcos' question. I've added them to the UsingMonads page of the Haskell Wiki, http://www.haskell.org/wiki/wiki?UsingMonads Hope that's OK. Feel free to edit or extend or add your names if you like. To everyone else on the list: please ad

[Haskell-cafe] Stacking monads - beginner design question

2008-01-29 Thread Adam Smyczek
Hi, My application has to manage a data set. I assume the state monad is designed for this. The state changes in functions that: a. perform IO actions and b. return execution status and execution trace (right now I'm using WriteT for this). Is the best solution: 1. to build a monad stack (

[Haskell-cafe] Random numbers / monads - beginner question

2008-05-08 Thread Madoc
I could achive my goals easier would be appreciated. (I left out comments and function types for the sake of brevity.) Thanks a lot in advance. Madoc. -- View this message in context: http://www.nabble.com/Random-numbers---monads---beginner-question-tp17124380p17124380.html Sent from the Haskell

Re: [Haskell-cafe] Stacking monads - beginner design question

2008-01-29 Thread Jonathan Cast
On 29 Jan 2008, at 9:44 PM, Adam Smyczek wrote: Hi, My application has to manage a data set. I assume the state monad is designed for this. The state changes in functions that: a. perform IO actions and b. return execution status and execution trace (right now I'm using WriteT for this).

Re: [Haskell-cafe] Stacking monads - beginner design question

2008-01-29 Thread Adam Smyczek
It works like a charm, thanks a lot Jonathan! Adam On Jan 29, 2008, at 10:26 PM, Jonathan Cast wrote: On 29 Jan 2008, at 9:44 PM, Adam Smyczek wrote: Hi, My application has to manage a data set. I assume the state monad is designed for this. The state changes in functions that: a. perf

Re: [Haskell-cafe] Stacking monads - beginner design question

2008-01-30 Thread Johan Tibell
> Are monad stacks with 3 and more monads common? > How could an example implementation look like? I found reading the xmonad code (http://code.haskell.org/xmonad/) enlightening. The X monad definition can be found in http://code.haskell.org/xmonad/XMonad/Core.hs -- | The X monad, a StateT transf

Re: [Haskell-cafe] Stacking monads - beginner design question

2008-01-30 Thread Brent Yorgey
On Jan 30, 2008 12:44 AM, Adam Smyczek <[EMAIL PROTECTED]> wrote: > Hi, > > My application has to manage a data set. I assume the state monad is > designed for this. > The state changes in functions that: > a. perform IO actions and > b. return execution status and execution trace (right now I'm u

Re: [Haskell-cafe] Random numbers / monads - beginner question

2008-05-08 Thread Claude Heiland-Allen
Madoc wrote: Given a list of numbers, I want to modify each of those numbers by adding a random offset. However, each such modified number shall stay within certain bounds, given by the integers minValue and maxValue. After that, I want to continue computation with the resulting list of type [Int

Re: [Haskell-cafe] Random numbers / monads - beginner question

2008-05-08 Thread Thomas Dinsdale-Young
Madoc wrote: Given a list of numbers, I want to modify each of those numbers by adding a random offset. However, each such modified number shall stay within certain bounds, given by the integers minValue and maxValue. After that, I want to continue computation with the resulting list of type [Int

Re: [Haskell-cafe] Random numbers / monads - beginner question

2008-05-08 Thread Brent Yorgey
2008/5/8 Thomas Dinsdale-Young <[EMAIL PROTECTED]>: > Madoc wrote: > > Given a list of numbers, I want to modify each of those numbers by adding a > > random offset. However, each such modified number shall stay within certain > > bounds, given by the integers minValue and maxValue. After that, I

Re: [Haskell-cafe] Random numbers / monads - beginner question

2008-05-08 Thread Henning Thielemann
On Thu, 8 May 2008, Madoc wrote: Given a list of numbers, I want to modify each of those numbers by adding a random offset. However, each such modified number shall stay within certain bounds, given by the integers minValue and maxValue. After that, I want to continue computation with the resul

Re: [Haskell-cafe] Random numbers / monads - beginner question

2008-05-08 Thread Sebastian Sylvan
2008/5/8 Madoc <[EMAIL PROTECTED]>: > Hello, > > I am just learning Haskell. Now, I encountered something that I cannot > solve by myself. Your advice will be greatly appreciated. > > Given a list of numbers, I want to modify each of those numbers by adding a > random offset. However, each such mo

Re: [Haskell-cafe] Random numbers / monads - beginner question

2008-05-08 Thread Dan Weston
Henning Thielemann wrote: On Thu, 8 May 2008, Madoc wrote: minValue = 0::Int maxValue = 1000::Int normalize a | a < minValue = minValue | a > maxValue = maxValue | otherwise = a normalize' = min maxValue . max minValue There is a curiosity here. The functions normal

[Haskell-cafe] Thanks for the help! (Random numbers / monads - beginner question)

2008-05-08 Thread Madoc
had a very similar question at the same time. Thanks very much, this was really great for me! -- View this message in context: http://www.nabble.com/Random-numbers---monads---beginner-question-tp17124380p17125957.html Sent from the Haskell - Haskell-Cafe mailing list archive at