Programming

Scala

Val and def

In the above class definition ‘val’ means, that the class has the fields head and tail. Without ‘val’ those fields are private. So ‘val’ is a way to define a

Programming

Coin change problem

If somebody asks you to change a 10 cent coin and you have an unlimited number of 1 cent coins, 2 cent coins, and 5 cent coins, in how many

Programming, Scala

Call by Name vs Call by Value in Scala

This information is based on the coursera course “Functional Programming Principles in Scala” by Martin Odersky. In Scala expressions* are evaluated by the Scala interpreter following the substitution model. What

Scroll to Top
Cookie Consent with Real Cookie Banner