sdkfasldf
sdkfasldf

Reputation: 607

How do I specify Tuple for typechecking in Scala, if I take it in as a parameter

There doesn't seem to be a class called Tuple in the package, only the Tuple_ for effective access. If I want to take a tuple into constructor as a parameter what do I do?

class DataElement( datatype: Datatype, values: () ) extends Element {

This doesn't seem to work

Upvotes: 0

Views: 116

Answers (1)

Kim Stebel
Kim Stebel

Reputation: 42037

All tuple classes implement Product, so you could use that.

Upvotes: 3

Related Questions