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.
type family (as :: [k])
++ (bs :: [k]) :: [k]vinyl Data.Vinyl.TypeLevel Append for type-level lists.
type family (a1 :: [a])
++ (a2 :: [a]) :: [a]singletons-base Data.List.Singletons No documentation available.
type family (a1 :: [a])
++ (a2 :: [a]) :: [a]singletons-base Prelude.Singletons No documentation available.
-
vector-sized Data.Vector.Generic.Sized O(m+n) Concatenate two vectors.
(
++ ) :: forall (n :: Nat) (m :: Nat) a . Prim a => Vector n a -> Vector m a -> Vector (n + m) avector-sized Data.Vector.Primitive.Sized O(m+n) Concatenate two vectors.
(
++ ) :: forall (n :: Nat) (m :: Nat) a . Vector n a -> Vector m a -> Vector (n + m) avector-sized Data.Vector.Sized O(m+n) Concatenate two vectors.
(
++ ) :: forall (n :: Nat) (m :: Nat) a . Storable a => Vector n a -> Vector m a -> Vector (n + m) avector-sized Data.Vector.Storable.Sized O(m+n) Concatenate two vectors.
(
++ ) :: forall (n :: Nat) (m :: Nat) a . Unbox a => Vector n a -> Vector m a -> Vector (n + m) avector-sized Data.Vector.Unboxed.Sized O(m+n) Concatenate two vectors.
-
protolude Protolude (++) 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]
-
protolude Protolude.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 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]