Tuple2ΒΆ

Tuple2[A,B] is a simple data structure used to hold a pair of staged values.

Note that this name shadows the unstaged Scala type. For the unstaged type, use the full name scala.Tuple2[A,B]


Infix methods

class Tuple2[A,B]
def _1: A
Returns the first field in this Tuple2.
def _2: B
Returns the second field in this Tuple2.
def toString: String
Returns a printable String from this value.

NOTE: This method is unsynthesizable and can only be used on the CPU or in simulation.
def β€”β€”β€”-

def **Related methods**

def @table-start

def NoHeading

def pack[A:Type,B:Type](t: (A, B)): MTuple2[A,B]
Returns a staged Tuple2 from the given unstaged Tuple2.
def pack[A:Type,B:Type](a: A, b: B): MTuple2[A,B]
Returns a staged Tuple2 from the given pair of values. Shorthand for **pack((a,b))**.
def unpack[A:Type,B:Type](t: MTuple2[A,B]): (A,B)
Returns an unstaged scala.Tuple2 from this staged Tuple2. Shorthand for **(x._1, x._2)**.