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.
sum :: (Foldable t, Num a) => t a -> axmonad-contrib XMonad.Prelude 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 *
SumRep :: [RuntimeRep] -> RuntimeRepbase GHC.Base An unboxed sum of the given reps
SumRep :: [RuntimeRep] -> RuntimeRepbase GHC.Exts An unboxed sum of the given reps
-
base GHC.RTS.Flags No documentation available.
-
aeson Data.Aeson Specifies how to encode constructors of a sum datatype.
-
aeson Data.Aeson.TH Specifies how to encode constructors of a sum datatype.
-
aeson Data.Aeson.Types Specifies how to encode constructors of a sum datatype.
-
template-haskell Language.Haskell.TH In UnboxedSumE and UnboxedSumP, the number associated with a particular data constructor. SumAlts are one-indexed and should never exceed the value of its corresponding SumArity. For example:
-
template-haskell Language.Haskell.TH In UnboxedSumE, UnboxedSumT, and UnboxedSumP, the total number of SumAlts. For example, (#|#) has a SumArity of 2.
-
template-haskell Language.Haskell.TH.Syntax In UnboxedSumE and UnboxedSumP, the number associated with a particular data constructor. SumAlts are one-indexed and should never exceed the value of its corresponding SumArity. For example: