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.
-
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 slowdownExamples
>>> [1, 2, 3] ++ [4, 5, 6] [1,2,3,4,5,6]
>>> [] ++ [1, 2, 3] [1,2,3]
>>> [3, 2, 1] ++ [] [3,2,1]
type family (xs :: [Effect])
++ (ys :: [Effect]) :: [Effect]effectful-core Effectful.Internal.Effect Append two type-level lists together.
type family (xs :: [Effect])
++ (ys :: [Effect]) :: [Effect]effectful-core Effectful.Provider.List Append two type-level lists together.
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]
-
prelude-compat Data.List2010 No documentation available.
-
prelude-compat Prelude2010 No documentation available.
(
++ ) :: Vector a -> Vector a -> Vector arebase Rebase.Data.Vector No documentation available.
(
++ ) :: forall (m :: Type -> Type) a . Monad m => Stream m a -> Stream m a -> Stream m arebase Rebase.Data.Vector.Fusion.Stream.Monadic Concatenate two Streams
(
++ ) :: Vector v a => v a -> v a -> v arebase Rebase.Data.Vector.Generic No documentation available.
(
++ ) :: Prim a => Vector a -> Vector a -> Vector arebase Rebase.Data.Vector.Primitive No documentation available.