mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-14 10:45:06 +02:00
Updated french version of scala
This commit is contained in:
@@ -148,12 +148,12 @@ List("Dom", "Bob", "Natalia") foreach println
|
||||
val a = Array(1, 2, 3, 5, 8, 13)
|
||||
a(0)
|
||||
a(3)
|
||||
a(21) // Jette une exception
|
||||
a(21) // Lance une exception
|
||||
|
||||
val m = Map("fork" -> "tenedor", "spoon" -> "cuchara", "knife" -> "cuchillo")
|
||||
m("fork")
|
||||
m("spoon")
|
||||
m("bottle") // Jette une exception
|
||||
m("bottle") // Lance une exception
|
||||
|
||||
val safeM = m.withDefaultValue("no lo se")
|
||||
safeM("bottle")
|
||||
|
Reference in New Issue
Block a user