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.
sum :: forall (v :: Type -> Type) a (n :: Nat) . (Vector v a, Num a) => Vector v n a -> avector-sized Data.Vector.Generic.Sized O(n) Compute the sum of the elements.
sum :: forall a (n :: Nat) . (Prim a, Num a) => Vector n a -> avector-sized Data.Vector.Primitive.Sized O(n) Compute the sum of the elements.
sum :: forall a (n :: Nat) . Num a => Vector n a -> avector-sized Data.Vector.Sized O(n) Compute the sum of the elements.
sum :: forall a (n :: Nat) . (Storable a, Num a) => Vector n a -> avector-sized Data.Vector.Storable.Sized O(n) Compute the sum of the elements.
sum :: forall a (n :: Nat) . (Unbox a, Num a) => Vector n a -> avector-sized Data.Vector.Unboxed.Sized O(n) Compute the sum of the elements.
-
basement Basement.Compat.ExtList Sum the element in a list
-
ekg-core System.Metrics.Distribution Sum of values
-
ekg-core System.Metrics.Distribution.Internal Sum of values
sum :: (Foldable t, Num a) => t a -> aghc-internal GHC.Internal.Data.Foldable The sum function computes the sum of the numbers of a structure.
Examples
Basic usage:>>> sum [] 0
>>> sum [42] 42
>>> sum [1..10] 55
>>> sum [4.1, 2.0, 1.7] 7.8
>>> sum [1..] * Hangs forever *
sum :: (Foldable t, Num a) => t a -> aghc-internal GHC.Internal.Data.List The sum function computes the sum of the numbers of a structure.
Examples
Basic usage:>>> sum [] 0
>>> sum [42] 42
>>> sum [1..10] 55
>>> sum [4.1, 2.0, 1.7] 7.8
>>> sum [1..] * Hangs forever *