From 6ba82ee2da1143fb9f95f3de8efec3ca211b1c04 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 20 Dec 2017 17:20:45 -0500 Subject: [PATCH] :memo: storeSize. --- src/Data/Abstract/Store.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Data/Abstract/Store.hs b/src/Data/Abstract/Store.hs index 7978be0a9..6bfb5ec06 100644 --- a/src/Data/Abstract/Store.hs +++ b/src/Data/Abstract/Store.hs @@ -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