~~.Preview.LazySize

abstract class LazySize

When evaluated with comparison operators, [LazySize] preloads just enough stream elements to answer the questions

def s : ~[String] = ???

val lazySize = s.preview.previewSize

lazySize >= 10 // This will pre-load no more than 10 elements

lazySize < 100 // This will pre-load no more than 100 elements
Source
LazySize.scala
class java.lang.Object
trait scala.Matchable
class Any

Def

@scala.annotation.targetName("checkLess")
def <(i: Int): Boolean
@scala.annotation.targetName("checkGreater")
def <=(i: Int): Boolean
@scala.annotation.targetName("checkEqual")
def ==(i: Int): Boolean
@scala.annotation.targetName("checkLeq")
def >(i: Int): Boolean
@scala.annotation.targetName("checkGeq")
def >=(i: Int): Boolean
protected def preload(i: Int): Int
def size: Int

Total size

Total size

Preloads all elements, unless sizing is available in metadata

Source
LazySize.scala