Ranking methods: Difference between revisions

Content added Content deleted
Line 1,039: Line 1,039:
</pre>
</pre>
=={{header|Scala}}==
=={{header|Scala}}==
This example uses a type-safe singly-linked object model with no mutable state variables, which makes it longer than the Ruby version but demonstrates object-oriented functional programming style.
This example uses a type-safe singly-linked object model with no mutable state variables, which makes it longer than the Ruby version above, but demonstrates an object-oriented functional programming approach.
<lang Scala>object RankingMethods extends App {
<lang Scala>object RankingMethods extends App {
case class Score(score: Int, name: String) // incoming data
case class Score(score: Int, name: String) // incoming data