
6 Jun
2011
6 Jun
'11
11:54 a.m.
On Mon, Jun 06, 2011 at 09:08:40AM +0800, Haisheng Wu wrote:
Thanks Senastian!
I would refine the equality as below:
sequence [Just 2, Nothing] = do x <- Just 2 y <- sequence [Nothing] return (x:y) = Just 2 >>= \x -> sequence [Nothing] >>= \y -> return (x:y) = Nothing >>= \y -> return (2:y) = Nothing
Yes, exactly. -Brent