Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Tags
#odersky-programming-in-scala-1ed #scala
Question
to instantiate a new tuple that holds some objects, just [...].
Answer
place the objects in parentheses, separated by commas

Tags
#odersky-programming-in-scala-1ed #scala
Question
to instantiate a new tuple that holds some objects, just [...].
Answer
?

Tags
#odersky-programming-in-scala-1ed #scala
Question
to instantiate a new tuple that holds some objects, just [...].
Answer
place the objects in parentheses, separated by commas
If you want to change selection, open document below and click on "Move attachment"

Next Steps in Scala
les are very useful, for example, if you need to return multiple objects from a method. Whereas in Java you would often create a JavaBean-like class to hold the multiple return values, in Scala you can simply return a tuple. And it is simple: <span>to instantiate a new tuple that holds some objects, just place the objects in parentheses, separated by commas. Once you have a tuple instantiated, you can access its elements individually with a dot, underscore, and the one-based index of the element. An example is shown in Listing 3.4:

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.