RSSAmplifier

Andraž Bajt's blog · Sep 1, 2017

Implementing apply on tuples in Scala

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

One of the first things you learn as a newcomer to Scala is the difference between a list and a tuple: a list must be homogeneous but a tuple can be heterogeneous. That is all elements of a list must have the same types but a tuple can contain things of different types. A direct consequence of this is that a list can define a by-index accessor and a tuple cannot. You can use list(3) but you…

Read on /posts/2017-09-01-scala-tuple-apply/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.