
24 Nov
2012
24 Nov
'12
10:57 a.m.
Hi,
On 24 November 2012 15:15, Brent Yorgey
twoSucc :: StateT Int [] () twoSucc = do i <- get put (i+1) `mplus` put (i+2)
Another way of doing the same thing, which I find more intuitive, is the following: twoSucc :: StateT Int [] () twoSucc = do i <- get j <- lift [i+1, i+2] put j -- Ozgur Akgun