Update instructions/scala2.instructions.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Kent Yao
2025-12-30 11:48:03 +08:00
committed by GitHub
parent ec9192e47b
commit 5e0561a418

View File

@@ -261,7 +261,7 @@ targets.foreach {
// Good - match on type
targets.foreach {
case p: Pokemon =>
val loss = sys.min(0, myAttack - p.defense)
val loss = math.min(0, myAttack - p.defense)
p.copy(hp = p.hp - loss)
}
```