add a property test for pupdate and updateMap

This commit is contained in:
fanghr 2022-05-20 03:15:21 +08:00
parent bce9b45c25
commit cdffbeffc9
No known key found for this signature in database
GPG key ID: 35CD9A71CD5D5870
3 changed files with 87 additions and 4 deletions

View file

@ -246,7 +246,7 @@ closedBoundedInterval from to = PlutusTx.intersection (PlutusTx.from from) (Plut
--------------------------------------------------------------------------------
{- | / O(n) /. The expression @'updateMap' f k v@ will update the value @x@ at key @k@.
If @f x@ is Nothing, the key-value pair will be deleted from the map, otherwise the
If @f x@ is Nothing, the key-value pair will be deleted from the map, otherwise the
value will be updated.
-}
updateMap :: Eq k => (v -> Maybe v) -> k -> AssocMap.Map k v -> AssocMap.Map k v