[Haskell-beginners] [Haskell-cafe] select :: [(Float, a)] -> a -- Weighted stochastic selection - help?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Fri Sep 5 18:21:39 EDT 2008

On 2008 Sep 5, at 16:06, Daniel Fischer wrote:
> Am Freitag, 5. September 2008 21:51 schrieb C.M.Brown:
>> It's certainly possibly to define or use State in a way  that it  
>> gives
>> the impression of modifying a global state, it therefore having a
>> side-effect.
>> Chris.
> Can you give an example? I don't see how that can be done using
> Control.Monad.State(.Strict).State, unless invocations of put or  
> modify are
> considered side effects.

That' the only thing I can figure, but it's easy to show that it's not  
actually global state (trust me, I had to find ways to make it do  
global state for GUI callbacks.  pain!)

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Beginners mailing list