Hoogle Search
Within LTS Haskell 24.40 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
foldByKeyMap :: Ord k => Fold a b -> Fold (k, a) (Map k b)foldl Control.Foldl Given a Fold, produces a Map which applies that fold to each a separated by key k.
>>> fold (foldByKeyMap Control.Foldl.sum) [("a",1), ("b",2), ("b",20), ("a",10)] fromList [("a",11),("b",22)]foldMap :: Monoid w => (a -> w) -> (w -> b) -> Fold a bfoldl Control.Foldl Convert a "foldMap" to a Fold
hashMap :: (Eq a, Hashable a) => Fold (a, b) (HashMap a b)foldl Control.Foldl Fold pairs into a hash-map.
postmapM :: Monad m => (a -> m r) -> FoldM m x a -> FoldM m x rfoldl Control.Foldl (postmapM f folder) returns a new FoldM where f is applied to the final value.
postmapM pure = id postmapM (f >=> g) = postmapM g . postmapM f
postmapM k (pure r) = lifts (k r)
premap :: (a -> b) -> Fold b r -> Fold a rfoldl Control.Foldl (premap f folder) returns a new Fold where f is applied at each step
fold (premap f folder) list = fold folder (List.map f list)
>>> fold (premap Sum Foldl.mconcat) [1..10] Sum {getSum = 55}>>> fold Foldl.mconcat (List.map Sum [1..10]) Sum {getSum = 55}premap id = id premap (f . g) = premap g . premap f
premap k (pure r) = pure r premap k (f <*> x) = premap k f <*> premap k x
premapM :: Monad m => (a -> m b) -> FoldM m b r -> FoldM m a rfoldl Control.Foldl (premapM f folder) returns a new FoldM where f is applied to each input element
premapM return = id premapM (f <=< g) = premap g . premap f
premapM k (pure r) = pure r premapM k (f <*> x) = premapM k f <*> premapM k x
premap :: (a -> b) -> Fold1 b r -> Fold1 a rfoldl Control.Foldl.NonEmpty (premap f folder) returns a new Fold1 where f is applied at each step
Foldl1.fold1 (premap f folder) list = Foldl1.fold1 folder (NonEmpty.map f list)
>>> Foldl1.fold1 (premap Sum Foldl1.sconcat) (1 :| [2..10]) Sum {getSum = 55}>>> Foldl1.fold1 Foldl1.sconcat $ NonEmpty.map Sum (1 :| [2..10]) Sum {getSum = 55}premap id = id premap (f . g) = premap g . premap f
premap k (pure r) = pure r premap k (f <*> x) = premap k f <*> premap k x
premap :: (a -> b) -> Scan b r -> Scan a rfoldl Control.Scanl (premap f scaner) returns a new Scan where f is applied at each step
scan (premap f scaner) list = scan scaner (map f list)
premap id = id premap (f . g) = premap g . premap f
premap k (pure r) = pure r premap k (f <*> x) = premap k f <*> premap k x
premapM :: Monad m => (a -> m b) -> ScanM m b r -> ScanM m a rfoldl Control.Scanl (premapM f scaner) returns a new ScanM where f is applied to each input element
premapM return = id premapM (f <=< g) = premap g . premap f
premapM k (pure r) = pure r premapM k (f <*> x) = premapM k f <*> premapM k x
type
SessionMap = Map Text ByteStringyesod-core Yesod.Core.Handler No documentation available.