Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

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

  1. sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)

    mixed-types-num Numeric.MixedTypes.PreludeHiding

    Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.

    Examples

    Basic usage: For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.
    >>> sequenceA [Just 1, Just 2, Just 3]
    Just [1,2,3]
    
    >>> sequenceA [Right 1, Right 2, Right 3]
    Right [1,2,3]
    
    The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.
    >>> sequenceA [Just 1, Just 2, Just 3, Nothing]
    Nothing
    
    >>> sequenceA [Right 1, Right 2, Right 3, Left 4]
    Left 4
    

  2. sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()

    mixed-types-num Numeric.MixedTypes.PreludeHiding

    Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence. sequence_ is just like sequenceA_, but specialised to monadic actions.

  3. sequence_ :: Monad m => NonEmptyVector (m a) -> m ()

    nonempty-vector Data.Vector.NonEmpty

    Evaluate each action and discard the results

  4. sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)

    LambdaHack Game.LambdaHack.Core.Prelude

    Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.

    Examples

    Basic usage: For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.
    >>> sequenceA [Just 1, Just 2, Just 3]
    Just [1,2,3]
    
    >>> sequenceA [Right 1, Right 2, Right 3]
    Right [1,2,3]
    
    The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.
    >>> sequenceA [Just 1, Just 2, Just 3, Nothing]
    Nothing
    
    >>> sequenceA [Right 1, Right 2, Right 3, Left 4]
    Left 4
    

  5. sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()

    LambdaHack Game.LambdaHack.Core.Prelude

    Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence. sequence_ is just like sequenceA_, but specialised to monadic actions.

  6. sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()

    LambdaHack Game.LambdaHack.Core.Prelude

    Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence. sequence_ is just like sequenceA_, but specialised to monadic actions.

  7. sequenceVar :: (Traversable t, Backprop a, Reifies s W) => BVar s (t a) -> t (BVar s a)

    backprop Numeric.Backprop

    Extract all of the BVars out of a Traversable container of BVars. Note that this associates gradients in order of occurrence in the original data structure; the second item in the gradient is assumed to correspond with the second item in the input, etc.; this can cause unexpected behavior in Foldable instances that don't have a fixed number of items. NOTE: A potential source of performance overhead. If there are <math> total elements, and you use <math> of them, then there is an overhead cost on the order of <math>, with a constant factor dependent on the cost of add. Should be negligible for types with cheap add (like Double), but may be costly for things like large matrices. See <https://backprop.jle.im/07-performance.html the performance guide> for for details.

  8. sequenceVar :: forall t a s . (Reifies s W, Traversable t) => AddFunc a -> ZeroFunc a -> BVar s (t a) -> t (BVar s a)

    backprop Numeric.Backprop.Explicit

    sequenceVar, but with explicit add and zero.

  9. sequenceVar :: forall t a s . (Reifies s W, Traversable t) => AddFunc a -> ZeroFunc a -> BVar s (t a) -> t (BVar s a)

    backprop Numeric.Backprop.Internal

    sequenceVar, but with explicit add and zero.

  10. sequenceVar :: (Traversable t, Num a, Reifies s W) => BVar s (t a) -> t (BVar s a)

    backprop Numeric.Backprop.Num

    sequenceVar, but with Num constraints instead of Backprop constraints. Since v0.2.4, requires a Num constraint on t a.

Page 38 of many | Previous | Next