1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

📝 storeLookupAll.

This commit is contained in:
Rob Rix 2017-12-20 17:18:07 -05:00
parent 48ac9e284a
commit 1ea1d1e0ca

View File

@ -28,6 +28,7 @@ deriving instance Traversable (Cell l) => Traversable (Store l)
storeLookup :: Ord l => Address l a -> Store l a -> Maybe (Cell l a)
storeLookup (Address address) = Map.lookup address . unStore
-- | Look up the list of values stored for a given address, if any.
storeLookupAll :: (Ord l, Foldable (Cell l)) => Address l a -> Store l a -> Maybe [a]
storeLookupAll address = fmap toList . storeLookup address