mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
📝 storeSize.
This commit is contained in:
parent
82468ec491
commit
6ba82ee2da
@ -36,6 +36,7 @@ storeLookupAll address = fmap toList . storeLookup address
|
|||||||
storeInsert :: (Ord l, Semigroup (Cell l a), Pointed (Cell l)) => Address l a -> a -> Store l a -> Store l a
|
storeInsert :: (Ord l, Semigroup (Cell l a), Pointed (Cell l)) => Address l a -> a -> Store l a -> Store l a
|
||||||
storeInsert (Address address) value = Store . Map.insertWith (<>) address (point value) . unStore
|
storeInsert (Address address) value = Store . Map.insertWith (<>) address (point value) . unStore
|
||||||
|
|
||||||
|
-- | The number of addresses extant in a 'Store'.
|
||||||
storeSize :: Store l a -> Int
|
storeSize :: Store l a -> Int
|
||||||
storeSize = Map.size . unStore
|
storeSize = Map.size . unStore
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user