_print

trait _print[A]
class java.lang.Object
trait scala.Matchable
class Any
trait _use
object Stream

Def

inline def printId(using t: Any.Def.Tag[A]): Unit

Print to console with row id

Print to console with row id

Same as regular print, but with added first column identifying the object


('A' <> 'F').stream.map(v => (v.Int, v)).print

// Output
----------------- -- --
Id                _1 _2
----------------- -- --
scala.Tuple2@dzkr 65 A
scala.Tuple2@zn1  66 B
scala.Tuple2@71j3 67 C
scala.Tuple2@562u 68 D
scala.Tuple2@c8tt 69 E
scala.Tuple2@p0m8 70 F
----------------- -- --
Source
_print.scala