- Learn Scala Programming
- Slava Schmidt
- 73字
- 2025-02-24 07:23:48
Ways to define a function
To provide some common ground for the readers with different levels of Scala knowledge, let's recap how a function can be defined. We'll start with the basic approaches such as defining a method and placing it in different scopes to create a local function. Then we'll look at more interesting aspects, for example closing over scope, partial application, different ways to specify function literals, and, finally, currying.