ly one method can operate on a stream instance
// here "filter" has already operated on it.
stream.forEach { println(it) }
</pre>
<h3>Compliant solution</h3>
<pre>
val sequence = listOf("Hello", " ", "World").asSequence()
var totalLength = sequence.map { it.length }.sum() // Compliant, the sequence ends with the terminal operation "sum"
// here totalLength == 11
</pre>
<pre>
listOf("Hello", " ", "World").stream()
    .filter { it.isNotBlank() }
    .forEach { println(it) } // Compliant, the stream ends with