Hoogle Search
Within LTS Haskell 24.31 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
cabal-install-solver Distribution.Solver.Compat.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 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]
(
++ ) :: forall (n :: Nat) a (m :: Nat) . Vec n a -> Vec m a -> Vec (n + m) aclash-prelude Clash.Explicit.Prelude Append two vectors.
>>> (1:>2:>3:>Nil) ++ (7:>8:>Nil) 1 :> 2 :> 3 :> 7 :> 8 :> Nil
(
++ ) :: forall (n :: Nat) a (m :: Nat) . Vec n a -> Vec m a -> Vec (n + m) aclash-prelude Clash.Explicit.Prelude.Safe Append two vectors.
>>> (1:>2:>3:>Nil) ++ (7:>8:>Nil) 1 :> 2 :> 3 :> 7 :> 8 :> Nil
(
++ ) :: forall (n :: Nat) a (m :: Nat) . Vec n a -> Vec m a -> Vec (n + m) aclash-prelude Clash.Prelude Append two vectors.
>>> (1:>2:>3:>Nil) ++ (7:>8:>Nil) 1 :> 2 :> 3 :> 7 :> 8 :> Nil
(
++ ) :: forall (n :: Nat) a (m :: Nat) . Vec n a -> Vec m a -> Vec (n + m) aclash-prelude Clash.Prelude.Safe Append two vectors.
>>> (1:>2:>3:>Nil) ++ (7:>8:>Nil) 1 :> 2 :> 3 :> 7 :> 8 :> Nil
(
++ ) :: forall (n :: Nat) a (m :: Nat) . Vec n a -> Vec m a -> Vec (n + m) aclash-prelude Clash.Sized.Vector Append two vectors.
>>> (1:>2:>3:>Nil) ++ (7:>8:>Nil) 1 :> 2 :> 3 :> 7 :> 8 :> Nil
type family (as :: [k])
++ (bs :: [k]) :: [k]generic-lens-core Data.Generics.Product.Internal.HList No documentation available.
type family (es :: [Effect])
++ (es' :: [Effect]) :: [Effect]heftia Control.Monad.Hefty No documentation available.
-
ihaskell IHaskellPrelude (++) 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]
-
incipit-base Incipit.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]