Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

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

  1. (++) :: [a] -> [a] -> [a]

    ghc-internal GHC.Internal.Base

    (++) appends two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
    
    If the first list is not finite, the result is the first list.

    Performance considerations

    This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of (++) to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs. For the same reason concat = foldr (++) [] has linear performance, while foldl (++) [] is prone to quadratic slowdown

    Examples

    >>> [1, 2, 3] ++ [4, 5, 6]
    [1,2,3,4,5,6]
    
    >>> [] ++ [1, 2, 3]
    [1,2,3]
    
    >>> [3, 2, 1] ++ []
    [3,2,1]
    

  2. (++) :: [a] -> [a] -> [a]

    ghc-internal GHC.Internal.Data.List

    (++) appends two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
    
    If the first list is not finite, the result is the first list.

    Performance considerations

    This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of (++) to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs. For the same reason concat = foldr (++) [] has linear performance, while foldl (++) [] is prone to quadratic slowdown

    Examples

    >>> [1, 2, 3] ++ [4, 5, 6]
    [1,2,3,4,5,6]
    
    >>> [] ++ [1, 2, 3]
    [1,2,3]
    
    >>> [3, 2, 1] ++ []
    [3,2,1]
    

  3. (++) :: [a] -> [a] -> [a]

    ghc-internal GHC.Internal.Data.OldList

    (++) appends two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
    
    If the first list is not finite, the result is the first list.

    Performance considerations

    This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of (++) to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs. For the same reason concat = foldr (++) [] has linear performance, while foldl (++) [] is prone to quadratic slowdown

    Examples

    >>> [1, 2, 3] ++ [4, 5, 6]
    [1,2,3,4,5,6]
    
    >>> [] ++ [1, 2, 3]
    [1,2,3]
    
    >>> [3, 2, 1] ++ []
    [3,2,1]
    

  4. (++) :: [a] -> [a] -> [a]

    ghc-internal GHC.Internal.List

    (++) appends two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
    
    If the first list is not finite, the result is the first list.

    Performance considerations

    This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of (++) to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs. For the same reason concat = foldr (++) [] has linear performance, while foldl (++) [] is prone to quadratic slowdown

    Examples

    >>> [1, 2, 3] ++ [4, 5, 6]
    [1,2,3,4,5,6]
    
    >>> [] ++ [1, 2, 3]
    [1,2,3]
    
    >>> [3, 2, 1] ++ []
    [3,2,1]
    

  5. (++) :: [a] -> [a] -> [a]

    numeric-prelude NumericPrelude

    (++) appends two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
    
    If the first list is not finite, the result is the first list.

    Performance considerations

    This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of (++) to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs. For the same reason concat = foldr (++) [] has linear performance, while foldl (++) [] is prone to quadratic slowdown

    Examples

    >>> [1, 2, 3] ++ [4, 5, 6]
    [1,2,3,4,5,6]
    
    >>> [] ++ [1, 2, 3]
    [1,2,3]
    
    >>> [3, 2, 1] ++ []
    [3,2,1]
    

  6. (++) :: [a] -> [a] -> [a]

    numeric-prelude NumericPrelude.Base

    (++) appends two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
    
    If the first list is not finite, the result is the first list.

    Performance considerations

    This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of (++) to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs. For the same reason concat = foldr (++) [] has linear performance, while foldl (++) [] is prone to quadratic slowdown

    Examples

    >>> [1, 2, 3] ++ [4, 5, 6]
    [1,2,3,4,5,6]
    
    >>> [] ++ [1, 2, 3]
    [1,2,3]
    
    >>> [3, 2, 1] ++ []
    [3,2,1]
    

  7. (++) :: [a] -> [a] -> [a]

    numhask NumHask.Prelude

    (++) appends two lists, i.e.,

    [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
    [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
    
    If the first list is not finite, the result is the first list.

    Performance considerations

    This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of (++) to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs. For the same reason concat = foldr (++) [] has linear performance, while foldl (++) [] is prone to quadratic slowdown

    Examples

    >>> [1, 2, 3] ++ [4, 5, 6]
    [1,2,3,4,5,6]
    
    >>> [] ++ [1, 2, 3]
    [1,2,3]
    
    >>> [3, 2, 1] ++ []
    [3,2,1]
    

  8. (++) :: Monoid w => w -> w -> w

    basic-prelude BasicPrelude

    (++) = mappend
    

  9. (++) :: Monoid m => m -> m -> m

    classy-prelude ClassyPrelude

    No documentation available.

  10. (++) :: Foldable f => f a -> Infinite a -> Infinite a

    ghc-lib-parser GHC.Data.List.Infinite

    No documentation available.

Page 4 of many | Previous | Next