Hoogle Search
Within LTS Haskell 24.25 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
sumOf :: Num a => Getting (Endo (Endo a)) s a -> s -> alens Control.Lens.Fold Calculate the Sum of every number targeted by a Fold.
>>> sumOf both (5,6) 11 >>> sumOf folded [1,2,3,4] 10 >>> sumOf (folded.both) [(1,2),(3,4)] 10 >>> import Data.Data.Lens >>> sumOf biplate [(1::Int,[]),(2,[(3::Int,4::Int)])] :: Int 10
sum ≡ sumOf folded
This operation may be more strict than you would expect. If you want a lazier version use ala Sum . foldMapOfsumOf _1 :: Num a => (a, b) -> a sumOf (folded . _1) :: (Foldable f, Num a) => f (a, b) -> a
sumOf :: Num a => Getter s a -> s -> a sumOf :: Num a => Fold s a -> s -> a sumOf :: Num a => Lens' s a -> s -> a sumOf :: Num a => Iso' s a -> s -> a sumOf :: Num a => Traversal' s a -> s -> a sumOf :: Num a => Prism' s a -> s -> a
sumC :: forall (m :: Type -> Type) a o . (Monad m, Num a) => ConduitT a o m aconduit Conduit Get the sum of all values in the stream.
-
conduit Conduit Get the sum of all elements in the chunked stream.
-
conduit Data.Conduit.Combinators Get the sum of all elements in the chunked stream. Subject to fusion
summaryFailed :: Summary -> !PropertyCounthedgehog Hedgehog.Internal.Report No documentation available.
summaryGaveUp :: Summary -> !PropertyCounthedgehog Hedgehog.Internal.Report No documentation available.
summaryOK :: Summary -> !PropertyCounthedgehog Hedgehog.Internal.Report No documentation available.
summaryRunning :: Summary -> !PropertyCounthedgehog Hedgehog.Internal.Report No documentation available.
summaryWaiting :: Summary -> !PropertyCounthedgehog Hedgehog.Internal.Report No documentation available.
sum' :: (Foldable f, Num a) => f a -> aextra Data.Foldable.Extra