1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

📝 storeSize.

This commit is contained in:
Rob Rix 2017-12-20 17:20:45 -05:00
parent 82468ec491
commit 6ba82ee2da

View File

@ -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 (Address address) value = Store . Map.insertWith (<>) address (point value) . unStore
-- | The number of addresses extant in a 'Store'.
storeSize :: Store l a -> Int
storeSize = Map.size . unStore