Object that can be used as an endpoint for Chain construction expressions
that use the cons (::) operator.
Here's an example:
scala> 1 :: 2 :: 3 :: End res0: org.scalactic.Chain[Int] = Chain(1, 2, 3)
Note that unlike Nil, which is an instance of List[Nothing],
End is not an instance of Chain[Nothing], because there is
no empty Chain:
scala> Nil.isInstanceOf[List[_]] res0: Boolean = true scala> End.isInstanceOf[Chain[_]] res1: Boolean = false
A :: operator that serves to start a Chain construction
expression.
A :: operator that serves to start a Chain construction
expression.
The result of calling this method will always be a Chain of length 1.
Here's an example:
scala> 1 :: End res0: org.scalactic.Chain[Int] = Chain(1)
Returns "End".
Returns "End".