
  35
}
```
]

.forty-seven-right[
```scala mdoc:silent
sum(
  getEdaBalance(),
  getBobBalance()
)
// Eda
// Bob
// The sum is 155
```
]

---
# Parameters evaluation

.forty-seven-left[
```scala mdoc:reset
def sum(x: Int, y: Int): Unit = {
  val result = x + y
  println("The sum is $result")
}
```

<br>

```scala mdoc
def getEdaBalance(): Int = {
  println("Eda")
  120
}

def getBobBalance(): Int = {
  println("Bob")
  35
}
```
]

.forty-seven-right[
```scala mdoc:silent
val eda = getEdaBalance()
// Eda
va