Merge pull request #98 from ncaq/add-monad-value
added: instance Monad to Value
This commit is contained in:
commit
d2fdaaff36
@ -634,6 +634,10 @@ instance Applicative Value where
|
|||||||
(<*>) (Value f) (Value a) = Value (f a)
|
(<*>) (Value f) (Value a) = Value (f a)
|
||||||
pure = Value
|
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
|
-- | A list of single values. There's a limited set of functions
|
||||||
-- able to work with this data type (such as 'subList_select',
|
-- able to work with this data type (such as 'subList_select',
|
||||||
-- 'valList', 'in_' and 'exists').
|
-- 'valList', 'in_' and 'exists').
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user