module Data.MultiSet.Lens (multiSetOf) where

import Control.Lens

import Data.MultiSet

-- | Create a 'MultiSet' from a 'Getter', 'Fold', etc.
multiSetOf :: Getting (MultiSet a) s a -> s -> MultiSet a
-- same as 'setOf'
multiSetOf :: forall a s. Getting (MultiSet a) s a -> s -> MultiSet a
multiSetOf Getting (MultiSet a) s a
l = Getting (MultiSet a) s a -> (a -> MultiSet a) -> s -> MultiSet a
forall s (m :: * -> *) r a.
MonadReader s m =>
LensLike' (Const r) s a -> (a -> r) -> m r
views Getting (MultiSet a) s a
l a -> MultiSet a
forall a. a -> MultiSet a
singleton