[Haskell-cafe] State Monad

Sam G. sam.g at myrealbox.com
Wed Mar 2 20:03:54 EST 2005


I need a Monad to represent an internal stack. I mean I've got a lot of functions which operates on lists and I would not like to pass the list as an argument everytime. 

Could you help me writing this monad? To start, I just need a + function which will return the sum of the 2 toppest elements of the stack.

Thanks in advance,
Sam.



More information about the Haskell-Cafe mailing list