Julian Assange proff@iq.org
23 Feb 2001 15:54:48 +1100

Is there a standard construct for something of this ilk:

unliftM :: Monad m a -> a

In this case, I need to construct a localised stateful computation

comp :: Int -> Int
comp n = unliftM (do x <- ... return x)

 Julian Assange        |If you want to build a ship, don't drum up people
                       |together to collect wood or assign them tasks and
 proff@iq.org          |work, but rather teach them to long for the endless
 proff@gnu.ai.mit.edu  |immensity of the sea. -- Antoine de Saint Exupery