docs: update code that doesn't work

pull/3484/head
Don Alfons Nisnoni 2020-01-16 22:29:00 +08:00 committed by Alexander Medvednikov
parent 57f72f6cd8
commit 1e98a227cc
1 changed files with 15 additions and 16 deletions

View File

@ -316,7 +316,7 @@ m.delete('two')
numbers := { numbers := {
'one': 1, 'one': 1,
'two': 2, 'two': 2
} }
``` ```
@ -461,13 +461,11 @@ match os {
else { println(os) } else { println(os) }
} }
number := 2
s := match number { s := match number {
1 { 'one' } 1 { 'one' }
2 { 'two' } 2 { 'two' }
else { else { 'many'}
println('this works too')
'many'
}
} }
``` ```
@ -506,6 +504,7 @@ p := Point{
x: 10 x: 10
y: 20 y: 20
} }
println(p.x) // Struct fields are accessed using a dot println(p.x) // Struct fields are accessed using a dot
``` ```