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-lib-parser GHC.Prelude.Basic

    (++) 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. type family (xs :: [Effect]) ++ (ys :: [Effect]) :: [Effect]

    effectful-core Effectful.Internal.Effect

    Append two type-level lists together.

  3. type family (xs :: [Effect]) ++ (ys :: [Effect]) :: [Effect]

    effectful-core Effectful.Provider.List

    Append two type-level lists together.

  4. data ((b :: [a]) ++ (c :: [a])) (d :: [a])

    harpie Harpie.Shape

    List catenation.

    Example

    >>> data Example where Ex :: a -> Example  -- Hide the type of examples to avoid brittleness in different GHC versions
    
    >>> :kind! Ex (Eval ([1, 2] ++ [3, 4]) :: [Natural])
    Ex (Eval ([1, 2] ++ [3, 4]) :: [Natural]) :: Example
    = Ex [1, 2, 3, 4]
    

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

    prelude-compat Data.List2010

    No documentation available.

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

    prelude-compat Prelude2010

    No documentation available.

  7. (++) :: Vector a -> Vector a -> Vector a

    rebase Rebase.Data.Vector

    No documentation available.

  8. (++) :: forall (m :: Type -> Type) a . Monad m => Stream m a -> Stream m a -> Stream m a

    rebase Rebase.Data.Vector.Fusion.Stream.Monadic

    Concatenate two Streams

  9. (++) :: Vector v a => v a -> v a -> v a

    rebase Rebase.Data.Vector.Generic

    No documentation available.

  10. (++) :: Prim a => Vector a -> Vector a -> Vector a

    rebase Rebase.Data.Vector.Primitive

    No documentation available.

Page 5 of many | Previous | Next