Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. for1Of_ :: Functor f => Getting (TraversedF r f) s a -> s -> (a -> f r) -> f ()

    lens Control.Lens.Fold

    See forOf_ and traverse1Of_.

    >>> for1Of_ both1 ("abc", "bcd") (\ks -> Map.fromList [ (k, ()) | k <- ks ])
    fromList [('b',()),('c',())]
    
    for1Of_ :: Apply f => Fold1 s a -> s -> (a -> f r) -> f ()
    

  2. forMOf_ :: Monad m => Getting (Sequenced r m) s a -> s -> (a -> m r) -> m ()

    lens Control.Lens.Fold

    forMOf_ is mapMOf_ with two of its arguments flipped.

    >>> forMOf_ both ("hello","world") putStrLn
    hello
    world
    
    forM_forMOf_ folded
    
    forMOf_ :: Monad m => Getter s a     -> s -> (a -> m r) -> m ()
    forMOf_ :: Monad m => Fold s a       -> s -> (a -> m r) -> m ()
    forMOf_ :: Monad m => Lens' s a      -> s -> (a -> m r) -> m ()
    forMOf_ :: Monad m => Iso' s a       -> s -> (a -> m r) -> m ()
    forMOf_ :: Monad m => Traversal' s a -> s -> (a -> m r) -> m ()
    forMOf_ :: Monad m => Prism' s a     -> s -> (a -> m r) -> m ()
    

  3. forOf_ :: Functor f => Getting (Traversed r f) s a -> s -> (a -> f r) -> f ()

    lens Control.Lens.Fold

    Traverse over all of the targets of a Fold (or Getter), computing an Applicative (or Functor)-based answer, but unlike forOf do not construct a new structure. forOf_ generalizes for_ to work over any Fold. When passed a Getter, forOf_ can work over any Functor, but when passed a Fold, forOf_ requires an Applicative.

    for_forOf_ folded
    
    >>> forOf_ both ("hello","world") putStrLn
    hello
    world
    
    The rather specific signature of forOf_ allows it to be used as if the signature was any of:
    iforOf_ l s ≡ forOf_ l s . Indexed
    
    forOf_ :: Functor f     => Getter s a     -> s -> (a -> f r) -> f ()
    forOf_ :: Applicative f => Fold s a       -> s -> (a -> f r) -> f ()
    forOf_ :: Functor f     => Lens' s a      -> s -> (a -> f r) -> f ()
    forOf_ :: Functor f     => Iso' s a       -> s -> (a -> f r) -> f ()
    forOf_ :: Applicative f => Traversal' s a -> s -> (a -> f r) -> f ()
    forOf_ :: Applicative f => Prism' s a     -> s -> (a -> f r) -> f ()
    

  4. forMOf :: LensLike (WrappedMonad m) s t a b -> s -> (a -> m b) -> m t

    lens Control.Lens.Traversal

    forMOf is a flipped version of mapMOf, consistent with the definition of forM.

    >>> forMOf both (1,3) $ \x -> [x, x + 1]
    [(1,3),(1,4),(2,3),(2,4)]
    
    forMforMOf traverse
    forMOf l ≡ flip (mapMOf l)
    iforMOf l s ≡ forM l s . Indexed
    
    forMOf :: Monad m => Iso s t a b       -> s -> (a -> m b) -> m t
    forMOf :: Monad m => Lens s t a b      -> s -> (a -> m b) -> m t
    forMOf :: Monad m => Traversal s t a b -> s -> (a -> m b) -> m t
    

  5. forOf :: LensLike f s t a b -> s -> (a -> f b) -> f t

    lens Control.Lens.Traversal

    A version of traverseOf with the arguments flipped, such that:

    >>> forOf each (1,2,3) print
    1
    2
    3
    ((),(),())
    
    This function is only provided for consistency, flip is strictly more general.
    forOfflip
    forOfflip . traverseOf
    
    forforOf traverse
    ifor l s ≡ for l s . Indexed
    
    forOf :: Functor f => Iso s t a b -> s -> (a -> f b) -> f t
    forOf :: Functor f => Lens s t a b -> s -> (a -> f b) -> f t
    forOf :: Applicative f => Traversal s t a b -> s -> (a -> f b) -> f t
    

  6. forced :: forall (v :: Type -> Type) a . Vector v a => Iso' (v a) (v a)

    lens Data.Vector.Generic.Lens

    Convert a Vector to a version that doesn't retain any extra memory.

  7. forced :: forall a b p f . (Profunctor p, Functor f) => p (Vector a) (f (Vector b)) -> p (Vector a) (f (Vector b))

    lens Data.Vector.Lens

    Convert a Vector to a version that doesn't retain any extra memory.

  8. forConcurrently :: Traversable t => t a -> (a -> IO b) -> IO (t b)

    async Control.Concurrent.Async

    forConcurrently is mapConcurrently with its arguments flipped

    pages <- forConcurrently ["url1", "url2", "url3"] $ \url -> getURL url
    

  9. forConcurrently_ :: Foldable f => f a -> (a -> IO b) -> IO ()

    async Control.Concurrent.Async

    forConcurrently_ is forConcurrently with the return value discarded; a concurrent equivalent of forM_.

  10. forConcurrently :: Traversable t => t a -> (a -> IO b) -> IO (t b)

    async Control.Concurrent.Async.Internal

    forConcurrently is mapConcurrently with its arguments flipped

    pages <- forConcurrently ["url1", "url2", "url3"] $ \url -> getURL url
    

Page 16 of many | Previous | Next