zio.blocks.combinators.Concat
See theConcat companion object
Typeclass describing the element type produced by sequential concatenation of values of type L and R.
The derivation rules — implemented per platform — are:
- same type: keep that type;
- subtype + supertype: keep the supertype;
- siblings sharing a unique meaningful common supertype (e.g.
DogandCatextending sealedAnimal): keep that supertype (a supertype is ''meaningful'' when it is not a noise type such asAny,AnyRef,AnyVal,Object,Product, orSerializable); - otherwise: widen disjoint values into
Either[L, R]on Scala 2 (or produce the native unionL | Ron Scala 3).
Stream.concat uses isIdentityLike to decide whether it can reuse elements as-is or must wrap/project them through left and right.
Type parameters
- L
-
left element type
- R
-
right element type
Attributes
- Companion
- object
- Source
- Concat.scala
- Graph
-
- Supertypes
Members list
In this article