Hoogle Search

Within LTS Haskell 24.3 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. sum :: (Index ix, Source r e, Num e) => Array r ix e -> e

    massiv Data.Massiv.Array

    O(n) - Compute sum of all elements.

  2. sum :: (Foldable f, Num a) => f a -> a

    protolude Protolude.List

    No documentation available.

  3. sum :: (Foldable t, Num a) => t a -> a

    protolude Protolude.Partial

    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 *
    

  4. sum :: (Foldable t, Semiring a) => t a -> a

    semirings Data.Semiring

    The sum function computes the additive sum of the elements in a structure. This function is lazy. For a strict version, see sum'.

  5. sum :: (Foldable t, Num a) => t a -> a

    ghc-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 *
    

  6. sum :: (Foldable t, Num a) => t a -> a

    ghc-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 *
    

  7. sum :: Num a => [a] -> a

    ghc-internal GHC.Internal.Data.OldList

    The sum function computes the sum of a finite list of numbers.

    >>> sum []
    0
    
    >>> sum [42]
    42
    
    >>> sum [1..10]
    55
    
    >>> sum [4.1, 2.0, 1.7]
    7.8
    
    >>> sum [1..]
    * Hangs forever *
    

  8. sum :: Num a => [a] -> a

    ghc-internal GHC.Internal.List

    The sum function computes the sum of a finite list of numbers.

    >>> sum []
    0
    
    >>> sum [42]
    42
    
    >>> sum [1..10]
    55
    
    >>> sum [4.1, 2.0, 1.7]
    7.8
    
    >>> sum [1..]
    * Hangs forever *
    

  9. sum :: C a => [a] -> a

    numeric-prelude Algebra.Additive

    Sum up all elements of a list. An empty list yields zero. This function is inappropriate for number types like Peano. Maybe we should make sum a method of Additive. This would also make lengthLeft and lengthRight superfluous.

  10. sum :: C a => [a] -> a

    numeric-prelude Algebra.NonNegative

    No documentation available.

Page 12 of many | Previous | Next