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. ifoldlMOf :: Monad m => IndexedGetting i (Endo (r -> m r)) s a -> (i -> r -> a -> m r) -> r -> s -> m r

    diagrams-lib Diagrams.Prelude

    Monadic fold over the elements of a structure with an index, associating to the left. When you don't need access to the index then foldlMOf is more flexible in what it accepts.

    foldlMOf l ≡ ifoldlMOf l . const
    
    ifoldlMOf :: Monad m => IndexedGetter i s a     -> (i -> r -> a -> m r) -> r -> s -> m r
    ifoldlMOf :: Monad m => IndexedFold i s a       -> (i -> r -> a -> m r) -> r -> s -> m r
    ifoldlMOf :: Monad m => IndexedLens' i s a      -> (i -> r -> a -> m r) -> r -> s -> m r
    ifoldlMOf :: Monad m => IndexedTraversal' i s a -> (i -> r -> a -> m r) -> r -> s -> m r
    

  2. ifoldlOf :: IndexedGetting i (Dual (Endo r)) s a -> (i -> r -> a -> r) -> r -> s -> r

    diagrams-lib Diagrams.Prelude

    Left-associative fold of the parts of a structure that are viewed through an IndexedFold or IndexedTraversal with access to the i. When you don't need access to the index then foldlOf is more flexible in what it accepts.

    foldlOf l ≡ ifoldlOf l . const
    
    ifoldlOf :: IndexedGetter i s a     -> (i -> r -> a -> r) -> r -> s -> r
    ifoldlOf :: IndexedFold i s a       -> (i -> r -> a -> r) -> r -> s -> r
    ifoldlOf :: IndexedLens' i s a      -> (i -> r -> a -> r) -> r -> s -> r
    ifoldlOf :: IndexedTraversal' i s a -> (i -> r -> a -> r) -> r -> s -> r
    

  3. ifoldlOf' :: IndexedGetting i (Endo (r -> r)) s a -> (i -> r -> a -> r) -> r -> s -> r

    diagrams-lib Diagrams.Prelude

    Fold over the elements of a structure with an index, associating to the left, but strictly. When you don't need access to the index then foldlOf' is more flexible in what it accepts.

    foldlOf' l ≡ ifoldlOf' l . const
    
    ifoldlOf' :: IndexedGetter i s a       -> (i -> r -> a -> r) -> r -> s -> r
    ifoldlOf' :: IndexedFold i s a         -> (i -> r -> a -> r) -> r -> s -> r
    ifoldlOf' :: IndexedLens' i s a        -> (i -> r -> a -> r) -> r -> s -> r
    ifoldlOf' :: IndexedTraversal' i s a   -> (i -> r -> a -> r) -> r -> s -> r
    

  4. sFoldl :: forall b a (t1 :: b ~> (a ~> b)) (t2 :: b) (t3 :: t a) . SFoldable t => Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply (FoldlSym0 :: TyFun (b ~> (a ~> b)) (b ~> (t a ~> b)) -> Type) t1) t2) t3)

    singletons-base Prelude.Singletons

    No documentation available.

  5. sFoldl1 :: forall a (t1 :: a ~> (a ~> a)) (t2 :: t a) . SFoldable t => Sing t1 -> Sing t2 -> Sing (Apply (Apply (Foldl1Sym0 :: TyFun (a ~> (a ~> a)) (t a ~> a) -> Type) t1) t2)

    singletons-base Prelude.Singletons

    No documentation available.

  6. ifoldl :: forall (n :: Nat) a b . KnownNat n => (a -> Index n -> b -> a) -> a -> Vec n b -> a

    clash-prelude Clash.Explicit.Prelude

    Left fold (function applied to each element and its index)

    >>> let findRightmost x xs = ifoldl (\a i b -> if b == x then Just i else a) Nothing xs
    
    >>> findRightmost 3 (1:>3:>2:>4:>3:>5:>6:>Nil)
    Just 4
    
    >>> findRightmost 8 (1:>3:>2:>4:>3:>5:>6:>Nil)
    Nothing
    
    "ifoldl f z xs" corresponds to the following circuit layout:

  7. ifoldl :: forall (n :: Nat) a b . KnownNat n => (a -> Index n -> b -> a) -> a -> Vec n b -> a

    clash-prelude Clash.Explicit.Prelude.Safe

    Left fold (function applied to each element and its index)

    >>> let findRightmost x xs = ifoldl (\a i b -> if b == x then Just i else a) Nothing xs
    
    >>> findRightmost 3 (1:>3:>2:>4:>3:>5:>6:>Nil)
    Just 4
    
    >>> findRightmost 8 (1:>3:>2:>4:>3:>5:>6:>Nil)
    Nothing
    
    "ifoldl f z xs" corresponds to the following circuit layout:

  8. ifoldl :: forall (n :: Nat) a b . KnownNat n => (a -> Index n -> b -> a) -> a -> Vec n b -> a

    clash-prelude Clash.Prelude

    Left fold (function applied to each element and its index)

    >>> let findRightmost x xs = ifoldl (\a i b -> if b == x then Just i else a) Nothing xs
    
    >>> findRightmost 3 (1:>3:>2:>4:>3:>5:>6:>Nil)
    Just 4
    
    >>> findRightmost 8 (1:>3:>2:>4:>3:>5:>6:>Nil)
    Nothing
    
    "ifoldl f z xs" corresponds to the following circuit layout:

  9. ifoldl :: forall (n :: Nat) a b . KnownNat n => (a -> Index n -> b -> a) -> a -> Vec n b -> a

    clash-prelude Clash.Prelude.Safe

    Left fold (function applied to each element and its index)

    >>> let findRightmost x xs = ifoldl (\a i b -> if b == x then Just i else a) Nothing xs
    
    >>> findRightmost 3 (1:>3:>2:>4:>3:>5:>6:>Nil)
    Just 4
    
    >>> findRightmost 8 (1:>3:>2:>4:>3:>5:>6:>Nil)
    Nothing
    
    "ifoldl f z xs" corresponds to the following circuit layout:

Page 10 of many | Previous | Next