Opinions are my own. Blog: https://blog.lambdaspot.dev/
In free time 📸 or 🥁🎶🤘http://seasonfortheend.bandcamp.com
```scala
val isEven = (i: Int) => i % 2 == 0 // Function
```
and
```scala
def isEvenDef(i: Int) = i % 2 == 0 // Method
```
But functions have some extra capabilities as mentioned in part one. Also, functions are evaluated when defined, and methods each time.
```scala
val isEven = (i: Int) => i % 2 == 0 // Function
```
and
```scala
def isEvenDef(i: Int) = i % 2 == 0 // Method
```
But functions have some extra capabilities as mentioned in part one. Also, functions are evaluated when defined, and methods each time.
Methods (def) are different from functions (val).
youtu.be/mqJ1W6w5ZZM?...
Methods (def) are different from functions (val).
youtu.be/mqJ1W6w5ZZM?...
Including also two posts from @rockthejvm.bsky.social.
Including also two posts from @rockthejvm.bsky.social.
2️⃣3️⃣ this page now covers both Scala 2 and Scala 3:
www.scala-lang.org/development/