@@ -7,9 +7,20 @@ id :: Monad Id
7id = { ret : Id
7id = { ret : Id
8 , bind : \ma f -> case ma of Id a -> f a }
8 , bind : \ma f -> case ma of Id a -> f a }
10+data Maybe a = Nothing | Just a
14+ , bind : \ma f -> case ma of
10test :: forall m. Monad m -> m Number
19test :: forall m. Monad m -> m Number
11test = \m -> m.bind (m.ret 1) (\n1 ->
20test = \m -> m.bind (m.ret 1) (\n1 ->
12 m.bind (m.ret "Test") (\n2 ->
21 m.bind (m.ret "Test") (\n2 ->
13 m.ret n1))
22 m.ret n1))
15test1 = test id
24test1 = test id