Skip to content

Latest commit

 

History

History
72 lines (61 loc) · 5.26 KB

tuple2.rst

File metadata and controls

72 lines (61 loc) · 5.26 KB

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.
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

Returns a staged Tuple2 from the given unstaged Tuple2.
Returns a staged Tuple2 from the given pair of values. Shorthand for **pack((a,b))**.
Returns an unstaged scala.Tuple2 from this staged Tuple2. Shorthand for **(x._1, x._2)**.