Category: Uncategorized
-
Scala: Function literals
Also known as anonymous functions. This is a special type of functions that I have not seen like this in any other language, but I’m sure its there somewhere. It’s a function that can take a number of parameters and directly produce an output. The most common example would be: Or with two or more…
-
Scala. The difference between var and val
This is one of the first questions when starting to learn Scala. There seems to be two types of variables. Why? The reason is actually quite brilliant and even though I have worked in a dozen of other languages I have not seen it before. The reason is the we as programmers often make constant…