(<*>) f g = ap f g
pure a = Env $ pure $ Right a
-instance Alternative Env where
- empty = Env $ pure $ Left (Error "Undefined error")
- (<|>) f g = f >>= \ef -> g >>= \eg -> Env $ pure $ (ef <|> eg) //case ef of
- //Left e = eg
- //Right r = Right r
+//instance Alternative Env where
+// empty = Env $ pure $ Left (Error "Undefined error")
+// (<|>) f g = f >>= \ef -> g >>= \eg -> Env $ pure $ case ef of
+// Left e = eg
+// Right r = Right r
instance Monad Env where
bind e f = e >>= \ee -> Env $ pure $ case ee of