added: instance Monad to Value

I see #94.
I think to can easy create monad instance.
This commit is contained in:
ncaq 2018-07-31 17:20:29 +09:00
parent 08c9b4cdf9
commit 4b2670bf43

View File

@ -634,6 +634,10 @@ instance Applicative Value where
(<*>) (Value f) (Value a) = Value (f a)
pure = Value
instance Monad Value where
(>>=) x f = valueJoin $ fmap f x
where valueJoin (Value v) = v
-- | A list of single values. There's a limited set of functions
-- able to work with this data type (such as 'subList_select',
-- 'valList', 'in_' and 'exists').